Category: Matlab
Category Archives: Matlab
how aggregate duraration and sum it in timetable
Hi,
it’s a timetable and i want to sum all duration equal:
example:
04/01/2010 2202 1.23
05/01/2010 2202 1.26
……
i want this:
duration value
22:02 2.49 (1.23+1.26)Hi,
it’s a timetable and i want to sum all duration equal:
example:
04/01/2010 2202 1.23
05/01/2010 2202 1.26
……
i want this:
duration value
22:02 2.49 (1.23+1.26) Hi,
it’s a timetable and i want to sum all duration equal:
example:
04/01/2010 2202 1.23
05/01/2010 2202 1.26
……
i want this:
duration value
22:02 2.49 (1.23+1.26) how aggregate duraration and sum it in timetable MATLAB Answers — New Questions
How to resolve the error for creating mask from shape file?
I am using following MATLAB code to create mask using shape file
S = shaperead(shapefile.name);
% Shapefile projections
info = shapeinfo(shapefile.name);
crs = info.CoordinateReferenceSystem;
[S(1).lon,S(1).lat] = projinv(crs,S(1).X,S(1).Y);
%remove small triangles and squares
coord_lengths = arrayfun(@(s) numel(s.X), S);
not_useful_mask = coord_lengths < 10;
S(not_useful_mask) = [];
polygon = polyshape({S(1).lon}, {S(1).lat});
[Z,R] = readgeoraster(‘C:workndvi_2022_23.dat’);
p = R.ProjectedCRS;
[x,y] = worldGrid(R);
[lon,lat] = projinv(p,x,y);
% Create a logical mask
logical_mask = reshape(isinterior(polygon, lon(:), lat(:)), size(lon));
However, it is giving following error;
Ale.shp
Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or
unexpected results. Input data has been modified to create a well-defined polyshape.
> In polyshape/checkAndSimplify (line 526)
In polyshape (line 175)
In indices_caf (line 45)
Requested 408×5604579 (17.0GB) array exceeds maximum array size preference (15.8GB). This might cause MATLAB to
become unresponsive.
Error in polyshape/isinterior>check_inpolygon (line 65)
x = x(ones(Nv,1),:);
Error in polyshape/isinterior (line 50)
[in, on] = check_inpolygon(X, Y, xv, yv, tol);
Error in indices_caf (line 53)
logical_mask = reshape(isinterior(polygon, lon(:), lat(:)), size(lon));
shape file is attached as zip file while data file is uploaded on following link;
https://drive.google.com/file/d/1aqMYMJDlMOXvamybP-i6eiuo5ehYzdkh/view?usp=sharing
I would appreciate any help.I am using following MATLAB code to create mask using shape file
S = shaperead(shapefile.name);
% Shapefile projections
info = shapeinfo(shapefile.name);
crs = info.CoordinateReferenceSystem;
[S(1).lon,S(1).lat] = projinv(crs,S(1).X,S(1).Y);
%remove small triangles and squares
coord_lengths = arrayfun(@(s) numel(s.X), S);
not_useful_mask = coord_lengths < 10;
S(not_useful_mask) = [];
polygon = polyshape({S(1).lon}, {S(1).lat});
[Z,R] = readgeoraster(‘C:workndvi_2022_23.dat’);
p = R.ProjectedCRS;
[x,y] = worldGrid(R);
[lon,lat] = projinv(p,x,y);
% Create a logical mask
logical_mask = reshape(isinterior(polygon, lon(:), lat(:)), size(lon));
However, it is giving following error;
Ale.shp
Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or
unexpected results. Input data has been modified to create a well-defined polyshape.
> In polyshape/checkAndSimplify (line 526)
In polyshape (line 175)
In indices_caf (line 45)
Requested 408×5604579 (17.0GB) array exceeds maximum array size preference (15.8GB). This might cause MATLAB to
become unresponsive.
Error in polyshape/isinterior>check_inpolygon (line 65)
x = x(ones(Nv,1),:);
Error in polyshape/isinterior (line 50)
[in, on] = check_inpolygon(X, Y, xv, yv, tol);
Error in indices_caf (line 53)
logical_mask = reshape(isinterior(polygon, lon(:), lat(:)), size(lon));
shape file is attached as zip file while data file is uploaded on following link;
https://drive.google.com/file/d/1aqMYMJDlMOXvamybP-i6eiuo5ehYzdkh/view?usp=sharing
I would appreciate any help. I am using following MATLAB code to create mask using shape file
S = shaperead(shapefile.name);
% Shapefile projections
info = shapeinfo(shapefile.name);
crs = info.CoordinateReferenceSystem;
[S(1).lon,S(1).lat] = projinv(crs,S(1).X,S(1).Y);
%remove small triangles and squares
coord_lengths = arrayfun(@(s) numel(s.X), S);
not_useful_mask = coord_lengths < 10;
S(not_useful_mask) = [];
polygon = polyshape({S(1).lon}, {S(1).lat});
[Z,R] = readgeoraster(‘C:workndvi_2022_23.dat’);
p = R.ProjectedCRS;
[x,y] = worldGrid(R);
[lon,lat] = projinv(p,x,y);
% Create a logical mask
logical_mask = reshape(isinterior(polygon, lon(:), lat(:)), size(lon));
However, it is giving following error;
Ale.shp
Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or
unexpected results. Input data has been modified to create a well-defined polyshape.
> In polyshape/checkAndSimplify (line 526)
In polyshape (line 175)
In indices_caf (line 45)
Requested 408×5604579 (17.0GB) array exceeds maximum array size preference (15.8GB). This might cause MATLAB to
become unresponsive.
Error in polyshape/isinterior>check_inpolygon (line 65)
x = x(ones(Nv,1),:);
Error in polyshape/isinterior (line 50)
[in, on] = check_inpolygon(X, Y, xv, yv, tol);
Error in indices_caf (line 53)
logical_mask = reshape(isinterior(polygon, lon(:), lat(:)), size(lon));
shape file is attached as zip file while data file is uploaded on following link;
https://drive.google.com/file/d/1aqMYMJDlMOXvamybP-i6eiuo5ehYzdkh/view?usp=sharing
I would appreciate any help. how to resolve the error for creating mask from s MATLAB Answers — New Questions
Matlab Predict function is not efficient
Matlab Predict function is not efficient…Perhaps because it is general suitable for all models. Is there a way to speed it? I am working with incremental regression kernel. Predict takes more time than updatemetricsandfit!Matlab Predict function is not efficient…Perhaps because it is general suitable for all models. Is there a way to speed it? I am working with incremental regression kernel. Predict takes more time than updatemetricsandfit! Matlab Predict function is not efficient…Perhaps because it is general suitable for all models. Is there a way to speed it? I am working with incremental regression kernel. Predict takes more time than updatemetricsandfit! efficient MATLAB Answers — New Questions
How to use the attached excel file below to do a Fourier conversion and display the spectrogram?
How do I use the attached excel file below to do a Fourier conversion and display the spectrogram?How do I use the attached excel file below to do a Fourier conversion and display the spectrogram? How do I use the attached excel file below to do a Fourier conversion and display the spectrogram? fourier conversion and display the spectrogram MATLAB Answers — New Questions
Magnitude and phase of the signal using cwt
Hi,
I have a signal in time that I want to analize in the frequency domain using wavelet transform (to balance time and frequency resolution). When I check the magnitude scalogram that is automatically generated using the function cwt, the value of the magnitude that i read is somehow corresponding to the value I am expecting from the time signal. When I try to extract this values computing abs and angle of the coefficients I get from cwt and compare them with expected magnitude and phase, I see there is some scaling factor. I tried to play with the sampling frequency, and it seems to be dependent also on this, but I could not figure out looking into the documentation how to get rid of this scaling factor.
coefs = cwt(signal, scales, wavelet);
mag=abs(coefs);
ph=angle(coefs);
I am taking the magnitude and phase at the freqeuncy where I have the peak, of course, using max(). That’s the one I want to extract.Hi,
I have a signal in time that I want to analize in the frequency domain using wavelet transform (to balance time and frequency resolution). When I check the magnitude scalogram that is automatically generated using the function cwt, the value of the magnitude that i read is somehow corresponding to the value I am expecting from the time signal. When I try to extract this values computing abs and angle of the coefficients I get from cwt and compare them with expected magnitude and phase, I see there is some scaling factor. I tried to play with the sampling frequency, and it seems to be dependent also on this, but I could not figure out looking into the documentation how to get rid of this scaling factor.
coefs = cwt(signal, scales, wavelet);
mag=abs(coefs);
ph=angle(coefs);
I am taking the magnitude and phase at the freqeuncy where I have the peak, of course, using max(). That’s the one I want to extract. Hi,
I have a signal in time that I want to analize in the frequency domain using wavelet transform (to balance time and frequency resolution). When I check the magnitude scalogram that is automatically generated using the function cwt, the value of the magnitude that i read is somehow corresponding to the value I am expecting from the time signal. When I try to extract this values computing abs and angle of the coefficients I get from cwt and compare them with expected magnitude and phase, I see there is some scaling factor. I tried to play with the sampling frequency, and it seems to be dependent also on this, but I could not figure out looking into the documentation how to get rid of this scaling factor.
coefs = cwt(signal, scales, wavelet);
mag=abs(coefs);
ph=angle(coefs);
I am taking the magnitude and phase at the freqeuncy where I have the peak, of course, using max(). That’s the one I want to extract. wavelet transform, cwt, magnitude, phase, signal in time domain MATLAB Answers — New Questions
Using lookup table with continuous signal
Hi, I’m trying to use LookUpTables with Breakpoints from 0 to 2*pi with input signals that can range from -inf to inf. Since the relationship between the input and output is continuous and repeats, I tried using the MatLab functions WrapTo2Pi() and Unwrap(). Although the LookUpTable combined with WrapTo2Pi() delivers the expected result, I have not found a way to convert the output signal from the table back into a continuous signal without jumps.
I assume that Unwarp() does not work as it only receives one Signal value at a time, and is not able to detect signal jumps because of it. Is there a similar function in Simulink that i could use instead?Hi, I’m trying to use LookUpTables with Breakpoints from 0 to 2*pi with input signals that can range from -inf to inf. Since the relationship between the input and output is continuous and repeats, I tried using the MatLab functions WrapTo2Pi() and Unwrap(). Although the LookUpTable combined with WrapTo2Pi() delivers the expected result, I have not found a way to convert the output signal from the table back into a continuous signal without jumps.
I assume that Unwarp() does not work as it only receives one Signal value at a time, and is not able to detect signal jumps because of it. Is there a similar function in Simulink that i could use instead? Hi, I’m trying to use LookUpTables with Breakpoints from 0 to 2*pi with input signals that can range from -inf to inf. Since the relationship between the input and output is continuous and repeats, I tried using the MatLab functions WrapTo2Pi() and Unwrap(). Although the LookUpTable combined with WrapTo2Pi() delivers the expected result, I have not found a way to convert the output signal from the table back into a continuous signal without jumps.
I assume that Unwarp() does not work as it only receives one Signal value at a time, and is not able to detect signal jumps because of it. Is there a similar function in Simulink that i could use instead? lookuptable, simulink MATLAB Answers — New Questions
retrieve version inside AppDesigner appplication (.mlapp file)
Does anyone know how to retrieve (programmatically) the version inside an .mlapp file?
This property is available on top level of the GUI, in picture below it is 1.02. I’d like to display it in a text label in the app.Does anyone know how to retrieve (programmatically) the version inside an .mlapp file?
This property is available on top level of the GUI, in picture below it is 1.02. I’d like to display it in a text label in the app. Does anyone know how to retrieve (programmatically) the version inside an .mlapp file?
This property is available on top level of the GUI, in picture below it is 1.02. I’d like to display it in a text label in the app. appdesigner MATLAB Answers — New Questions
How can I select custom type as parameter type in c-function block?
My main problem is that I want to use a custom device type Q16_t which is declared in a header file q16t.hpp. Because this file inlude several other header files, which also includes headerfile I have a big dependency tree.
In order to trim this problem to an easier starting point, I started with this example:
https://de.mathworks.com/help/simulink/ug/interface-with-c-classes-using-c-function-block.html
I added the source code, include headers and search directories as described in the example, but I am not able to select this class parameter. A picture of all parameter types which I can select is attached.
I tested to import it with Simulink.ImportExternalCTypes but this didn’t have any effect.
I added include header, search directories and source files in C Function block as well as in the model settings simulation target pane to make sure, that files can be found. In model settings simulation target pane the validate custom code is executed without any errors. Did I miss an important setting in advanced parameter menue or anything else?
Any help is appreciated.
Kind regards
SaschaMy main problem is that I want to use a custom device type Q16_t which is declared in a header file q16t.hpp. Because this file inlude several other header files, which also includes headerfile I have a big dependency tree.
In order to trim this problem to an easier starting point, I started with this example:
https://de.mathworks.com/help/simulink/ug/interface-with-c-classes-using-c-function-block.html
I added the source code, include headers and search directories as described in the example, but I am not able to select this class parameter. A picture of all parameter types which I can select is attached.
I tested to import it with Simulink.ImportExternalCTypes but this didn’t have any effect.
I added include header, search directories and source files in C Function block as well as in the model settings simulation target pane to make sure, that files can be found. In model settings simulation target pane the validate custom code is executed without any errors. Did I miss an important setting in advanced parameter menue or anything else?
Any help is appreciated.
Kind regards
Sascha My main problem is that I want to use a custom device type Q16_t which is declared in a header file q16t.hpp. Because this file inlude several other header files, which also includes headerfile I have a big dependency tree.
In order to trim this problem to an easier starting point, I started with this example:
https://de.mathworks.com/help/simulink/ug/interface-with-c-classes-using-c-function-block.html
I added the source code, include headers and search directories as described in the example, but I am not able to select this class parameter. A picture of all parameter types which I can select is attached.
I tested to import it with Simulink.ImportExternalCTypes but this didn’t have any effect.
I added include header, search directories and source files in C Function block as well as in the model settings simulation target pane to make sure, that files can be found. In model settings simulation target pane the validate custom code is executed without any errors. Did I miss an important setting in advanced parameter menue or anything else?
Any help is appreciated.
Kind regards
Sascha c++, integrate_c_code MATLAB Answers — New Questions
Where is the reference ground for the op amplifier in simscape
I want to know what the electrical reference for the op-amplifier is. The output voltage range of a general op-amplifier should be relative to its power supply. But there is actually no defined input power supply for the op-amplifier in Simulink, is the electrical reference the reference ground for the entire system at this time? Will this be a problem in some complex simulation models.
I built a DAB converter that includes an active filter. The op amplifier plays an important role here, but I found that its input end is not dashed. It is confusing.I want to know what the electrical reference for the op-amplifier is. The output voltage range of a general op-amplifier should be relative to its power supply. But there is actually no defined input power supply for the op-amplifier in Simulink, is the electrical reference the reference ground for the entire system at this time? Will this be a problem in some complex simulation models.
I built a DAB converter that includes an active filter. The op amplifier plays an important role here, but I found that its input end is not dashed. It is confusing. I want to know what the electrical reference for the op-amplifier is. The output voltage range of a general op-amplifier should be relative to its power supply. But there is actually no defined input power supply for the op-amplifier in Simulink, is the electrical reference the reference ground for the entire system at this time? Will this be a problem in some complex simulation models.
I built a DAB converter that includes an active filter. The op amplifier plays an important role here, but I found that its input end is not dashed. It is confusing. modelling of op-amplifier, simscape, electrical reference MATLAB Answers — New Questions
Object Detection to Code Generation:
Hello,
Is Train ACF object detector compatible with code generation? I am seeing some difficulty compiling the detector to download it to a target for a real time application. Any insight would be greatly appreciated. There is a limitted info in help doc but it is only for object detection from an image, even then, the example does not deep dive 🙂
Thank you.
BestHello,
Is Train ACF object detector compatible with code generation? I am seeing some difficulty compiling the detector to download it to a target for a real time application. Any insight would be greatly appreciated. There is a limitted info in help doc but it is only for object detection from an image, even then, the example does not deep dive 🙂
Thank you.
Best Hello,
Is Train ACF object detector compatible with code generation? I am seeing some difficulty compiling the detector to download it to a target for a real time application. Any insight would be greatly appreciated. There is a limitted info in help doc but it is only for object detection from an image, even then, the example does not deep dive 🙂
Thank you.
Best code generation, object detection, computer vision MATLAB Answers — New Questions
Image processing for pattern restoration
Hi.
I am working on restoring unclearly printed rectangular patterns using MATLAB. All original patterns are exact rectangular, and I am taking photos for collecting original printed images by a camera. The attached images show the original image used (first), the filled image extracted through the written code (second), and the desired final image (third). My goal is to achieve an image like the third one. The edges do not need to be perfectly rectangular; a rough restoration is sufficient. Any clue would be helpful to me. Thank you.
clc; clear;
imFile="image1.jpg";
Image_Original=imread(imFile);
Image_Gray=rgb2gray(Image_Original);
Image_Inversed = imcomplement(Image_Gray);
Image_BW = imbinarize(Image_Inversed);
Image_BW_filled = imfill(Image_BW,"holes");
edges = edge(Image_BW_filled, ‘Canny’);
imshow(Image_BW_filled)Hi.
I am working on restoring unclearly printed rectangular patterns using MATLAB. All original patterns are exact rectangular, and I am taking photos for collecting original printed images by a camera. The attached images show the original image used (first), the filled image extracted through the written code (second), and the desired final image (third). My goal is to achieve an image like the third one. The edges do not need to be perfectly rectangular; a rough restoration is sufficient. Any clue would be helpful to me. Thank you.
clc; clear;
imFile="image1.jpg";
Image_Original=imread(imFile);
Image_Gray=rgb2gray(Image_Original);
Image_Inversed = imcomplement(Image_Gray);
Image_BW = imbinarize(Image_Inversed);
Image_BW_filled = imfill(Image_BW,"holes");
edges = edge(Image_BW_filled, ‘Canny’);
imshow(Image_BW_filled) Hi.
I am working on restoring unclearly printed rectangular patterns using MATLAB. All original patterns are exact rectangular, and I am taking photos for collecting original printed images by a camera. The attached images show the original image used (first), the filled image extracted through the written code (second), and the desired final image (third). My goal is to achieve an image like the third one. The edges do not need to be perfectly rectangular; a rough restoration is sufficient. Any clue would be helpful to me. Thank you.
clc; clear;
imFile="image1.jpg";
Image_Original=imread(imFile);
Image_Gray=rgb2gray(Image_Original);
Image_Inversed = imcomplement(Image_Gray);
Image_BW = imbinarize(Image_Inversed);
Image_BW_filled = imfill(Image_BW,"holes");
edges = edge(Image_BW_filled, ‘Canny’);
imshow(Image_BW_filled) image, image processing, image restoration MATLAB Answers — New Questions
INCA – MIP, API’s are not executing
I am trying to automate the INCA V7.2 with Matlab R2020b by INCA – MIP V7.2.17.74 pacakage. But when I try to use the API’s they are throwing me the errors.
Attempt to execute SCRIPT IncaOpenDatabase as a function:
C:mydirEtasDataINCA7.2INCA-MIPIncaOpenDatabase.mI am trying to automate the INCA V7.2 with Matlab R2020b by INCA – MIP V7.2.17.74 pacakage. But when I try to use the API’s they are throwing me the errors.
Attempt to execute SCRIPT IncaOpenDatabase as a function:
C:mydirEtasDataINCA7.2INCA-MIPIncaOpenDatabase.m I am trying to automate the INCA V7.2 with Matlab R2020b by INCA – MIP V7.2.17.74 pacakage. But when I try to use the API’s they are throwing me the errors.
Attempt to execute SCRIPT IncaOpenDatabase as a function:
C:mydirEtasDataINCA7.2INCA-MIPIncaOpenDatabase.m inca, automation, inca mip MATLAB Answers — New Questions
[Simulink] How to change the type of the number in “chart”?
I want to make a simple countup model in "chart" block (state machine) like the attached picture.
However, there is an error when I simulate this model.
The problem is the types of the parameter ‘cnt’ and the added number "1" are different.
I set ‘cnt’ "fixdt(0,4,0)", so also want ‘1’ to be fixdt(0,4,0), but I don’t know how to set the type.
How can I do this?
Best,I want to make a simple countup model in "chart" block (state machine) like the attached picture.
However, there is an error when I simulate this model.
The problem is the types of the parameter ‘cnt’ and the added number "1" are different.
I set ‘cnt’ "fixdt(0,4,0)", so also want ‘1’ to be fixdt(0,4,0), but I don’t know how to set the type.
How can I do this?
Best, I want to make a simple countup model in "chart" block (state machine) like the attached picture.
However, there is an error when I simulate this model.
The problem is the types of the parameter ‘cnt’ and the added number "1" are different.
I set ‘cnt’ "fixdt(0,4,0)", so also want ‘1’ to be fixdt(0,4,0), but I don’t know how to set the type.
How can I do this?
Best, simulink, chart, stateflow MATLAB Answers — New Questions
What optimization/search method is used in wblfit?
I am writing an article about maximum likelihood methods. To understand Matlab methods better, I selected parameters Weibull a=250 and b=1.5 to simulate 50 life tests to failure (no censoring) with rng(1). The parameter estimate results of a=275 and b=1.355 using wblfit were close to the selected values. Contour and surface plots of the loglikelihood values around the parameter values shows a nearly flat surface around values of b = 1.4. What search method is used in wblfit to optimize the results? Is there a way to use least squares regression?
Here is an example of my code for uncensored data.
clc
clear
close all
rng(1)
a = 250;
b = 1.5;
x=wblrnd(a,b,50,1);
h1 = figure;
h2 = probplot(‘weibull’,x);
set(h1,’WindowStyle’,’docked’)
grid on;
box on
[paramhat,paramci] = wblfit(x,.9);
T = table(x);
%% create a mesh grid
x = 0.75:0.1:2;
y = 200:10:300;
[x,y]=meshgrid(x,y);
[r,c]= size(x);
M = zeros(r,c);
for j = 1:c
beta = x(1,j);
for i = 1:r
theta = y(i,1);
M(i,j)=fnLL(T,theta,beta);
end
end
h1=figure;
h2=contour(x,y,M);
set(h1,’WindowStyle’,’docked’);
h1 = figure;
h2 = surf(x,y,M);
set(h1,’WindowStyle’,’docked’);
function LL=fnLL(T,theta,beta)
T.f = wblpdf(T.x,theta,beta);
T.L=log(T.f);
LL = sum(T.L);
endI am writing an article about maximum likelihood methods. To understand Matlab methods better, I selected parameters Weibull a=250 and b=1.5 to simulate 50 life tests to failure (no censoring) with rng(1). The parameter estimate results of a=275 and b=1.355 using wblfit were close to the selected values. Contour and surface plots of the loglikelihood values around the parameter values shows a nearly flat surface around values of b = 1.4. What search method is used in wblfit to optimize the results? Is there a way to use least squares regression?
Here is an example of my code for uncensored data.
clc
clear
close all
rng(1)
a = 250;
b = 1.5;
x=wblrnd(a,b,50,1);
h1 = figure;
h2 = probplot(‘weibull’,x);
set(h1,’WindowStyle’,’docked’)
grid on;
box on
[paramhat,paramci] = wblfit(x,.9);
T = table(x);
%% create a mesh grid
x = 0.75:0.1:2;
y = 200:10:300;
[x,y]=meshgrid(x,y);
[r,c]= size(x);
M = zeros(r,c);
for j = 1:c
beta = x(1,j);
for i = 1:r
theta = y(i,1);
M(i,j)=fnLL(T,theta,beta);
end
end
h1=figure;
h2=contour(x,y,M);
set(h1,’WindowStyle’,’docked’);
h1 = figure;
h2 = surf(x,y,M);
set(h1,’WindowStyle’,’docked’);
function LL=fnLL(T,theta,beta)
T.f = wblpdf(T.x,theta,beta);
T.L=log(T.f);
LL = sum(T.L);
end I am writing an article about maximum likelihood methods. To understand Matlab methods better, I selected parameters Weibull a=250 and b=1.5 to simulate 50 life tests to failure (no censoring) with rng(1). The parameter estimate results of a=275 and b=1.355 using wblfit were close to the selected values. Contour and surface plots of the loglikelihood values around the parameter values shows a nearly flat surface around values of b = 1.4. What search method is used in wblfit to optimize the results? Is there a way to use least squares regression?
Here is an example of my code for uncensored data.
clc
clear
close all
rng(1)
a = 250;
b = 1.5;
x=wblrnd(a,b,50,1);
h1 = figure;
h2 = probplot(‘weibull’,x);
set(h1,’WindowStyle’,’docked’)
grid on;
box on
[paramhat,paramci] = wblfit(x,.9);
T = table(x);
%% create a mesh grid
x = 0.75:0.1:2;
y = 200:10:300;
[x,y]=meshgrid(x,y);
[r,c]= size(x);
M = zeros(r,c);
for j = 1:c
beta = x(1,j);
for i = 1:r
theta = y(i,1);
M(i,j)=fnLL(T,theta,beta);
end
end
h1=figure;
h2=contour(x,y,M);
set(h1,’WindowStyle’,’docked’);
h1 = figure;
h2 = surf(x,y,M);
set(h1,’WindowStyle’,’docked’);
function LL=fnLL(T,theta,beta)
T.f = wblpdf(T.x,theta,beta);
T.L=log(T.f);
LL = sum(T.L);
end optimization weibull MATLAB Answers — New Questions
RIS and raytracing in urban enviroment
Hello everyone, i am using the raytracing propagation model and the comm.RayTracingChannel to analyze an urban enviroment. I set up some transmitter and one target in movement, and i wanna know if there is a way to implement in this enviroment the RIS (reconfigurable intelligence surface), interfacing them to the raytracing.Hello everyone, i am using the raytracing propagation model and the comm.RayTracingChannel to analyze an urban enviroment. I set up some transmitter and one target in movement, and i wanna know if there is a way to implement in this enviroment the RIS (reconfigurable intelligence surface), interfacing them to the raytracing. Hello everyone, i am using the raytracing propagation model and the comm.RayTracingChannel to analyze an urban enviroment. I set up some transmitter and one target in movement, and i wanna know if there is a way to implement in this enviroment the RIS (reconfigurable intelligence surface), interfacing them to the raytracing. raytracing, ris MATLAB Answers — New Questions
Calculate and Display Average Humidity
Hello,
iam trying with the above template to calculate average weight (field4) of channel 2165217 (public),
it works on field 1 but not on field 4 that i want.Both fields are send as string.
Error is :
Error using Calculate and display average humidity (line 21)
Unrecognized table variable name ‘x’.
What is wrong?,thank you.Hello,
iam trying with the above template to calculate average weight (field4) of channel 2165217 (public),
it works on field 1 but not on field 4 that i want.Both fields are send as string.
Error is :
Error using Calculate and display average humidity (line 21)
Unrecognized table variable name ‘x’.
What is wrong?,thank you. Hello,
iam trying with the above template to calculate average weight (field4) of channel 2165217 (public),
it works on field 1 but not on field 4 that i want.Both fields are send as string.
Error is :
Error using Calculate and display average humidity (line 21)
Unrecognized table variable name ‘x’.
What is wrong?,thank you. average MATLAB Answers — New Questions
Search for values of a specific point of the signal
Hello
I would like to find several values of a signal at a given time.
For example, I am looking for the peak value of a signal and I type [peaks, locs] and it detects the peak and the time, but I would like to know the value for example 50ms before and 100 ms before.
Could you help me with this?
Thank you very muchHello
I would like to find several values of a signal at a given time.
For example, I am looking for the peak value of a signal and I type [peaks, locs] and it detects the peak and the time, but I would like to know the value for example 50ms before and 100 ms before.
Could you help me with this?
Thank you very much Hello
I would like to find several values of a signal at a given time.
For example, I am looking for the peak value of a signal and I type [peaks, locs] and it detects the peak and the time, but I would like to know the value for example 50ms before and 100 ms before.
Could you help me with this?
Thank you very much signal processing MATLAB Answers — New Questions
How can I reduce the size of polygon map from shapefile by some distance?
Hello All,
I have a shape file from which i have Latitude and Logitude cordinates. In that map when I plot those cordinates using geoplot fuction.
I will put those cordinates here.
Longitude = [49.5307463706278 49.5307171760463 49.5304661019256 49.5302325434462 49.5299639498154 49.5298413304932 49.5297537450748 49.5292048728798 49.5288953996699 49.5282664017587 49.5282706081627 49.5282881257904 49.5283290002306 49.5283406786358 49.5283173218226 49.5282589297407 49.5282122160250 49.5281187884596 49.5281021034227 49.5282355728884 49.5287727776674 49.5292574247397 49.5296778375853 49.5298588475581 49.5302967721393 49.5304369071767 49.5304592844042 49.5304661019256 49.5304894577121 49.5306003975459 49.5308748265792 49.5308748265792 49.5308105986457 49.5308105986457 49.5308047597385 49.5307463706278 NaN];
Latitude = [7.92334633371693 7.92333733369920 7.92310333323818 7.92292333288354 7.92268033240478 7.92250033205015 7.92222133150046 7.92228433162458 7.92229333164232 7.92213669574119 7.92203233112809 7.92188833084439 7.92170833048975 7.92139332986914 7.92114132937265 7.92089832889389 7.92058332827328 7.91965632644691 7.91927486806551 7.91927832570217 7.91931432577310 7.91932332579083 7.91928732571990 7.91925132564897 7.91922432559578 7.91918832552485 7.91918465813742 7.91925132564897 7.91944932603907 7.92009732731576 7.92196933100397 7.92224833155366 7.92313033329137 7.92331033364601 7.92334633371693 7.92334633371693 NaN];
geoplot(Longitude,Latitude, "b")
So now I looking to create a border around these map on the inside and outside of this boundry. Let say a boundry which is 10 meter apart from the main boundry.
Here is a example of how I want to do it.
If you see in the figure blue line is the actual boundry and red and black boundry is that I am trying to find a function for it.
Is there a way to do it ? I have tried similar methods but those where on the images which can reduce size but not sure how to do it in actual map.
Thankyou in advance.Hello All,
I have a shape file from which i have Latitude and Logitude cordinates. In that map when I plot those cordinates using geoplot fuction.
I will put those cordinates here.
Longitude = [49.5307463706278 49.5307171760463 49.5304661019256 49.5302325434462 49.5299639498154 49.5298413304932 49.5297537450748 49.5292048728798 49.5288953996699 49.5282664017587 49.5282706081627 49.5282881257904 49.5283290002306 49.5283406786358 49.5283173218226 49.5282589297407 49.5282122160250 49.5281187884596 49.5281021034227 49.5282355728884 49.5287727776674 49.5292574247397 49.5296778375853 49.5298588475581 49.5302967721393 49.5304369071767 49.5304592844042 49.5304661019256 49.5304894577121 49.5306003975459 49.5308748265792 49.5308748265792 49.5308105986457 49.5308105986457 49.5308047597385 49.5307463706278 NaN];
Latitude = [7.92334633371693 7.92333733369920 7.92310333323818 7.92292333288354 7.92268033240478 7.92250033205015 7.92222133150046 7.92228433162458 7.92229333164232 7.92213669574119 7.92203233112809 7.92188833084439 7.92170833048975 7.92139332986914 7.92114132937265 7.92089832889389 7.92058332827328 7.91965632644691 7.91927486806551 7.91927832570217 7.91931432577310 7.91932332579083 7.91928732571990 7.91925132564897 7.91922432559578 7.91918832552485 7.91918465813742 7.91925132564897 7.91944932603907 7.92009732731576 7.92196933100397 7.92224833155366 7.92313033329137 7.92331033364601 7.92334633371693 7.92334633371693 NaN];
geoplot(Longitude,Latitude, "b")
So now I looking to create a border around these map on the inside and outside of this boundry. Let say a boundry which is 10 meter apart from the main boundry.
Here is a example of how I want to do it.
If you see in the figure blue line is the actual boundry and red and black boundry is that I am trying to find a function for it.
Is there a way to do it ? I have tried similar methods but those where on the images which can reduce size but not sure how to do it in actual map.
Thankyou in advance. Hello All,
I have a shape file from which i have Latitude and Logitude cordinates. In that map when I plot those cordinates using geoplot fuction.
I will put those cordinates here.
Longitude = [49.5307463706278 49.5307171760463 49.5304661019256 49.5302325434462 49.5299639498154 49.5298413304932 49.5297537450748 49.5292048728798 49.5288953996699 49.5282664017587 49.5282706081627 49.5282881257904 49.5283290002306 49.5283406786358 49.5283173218226 49.5282589297407 49.5282122160250 49.5281187884596 49.5281021034227 49.5282355728884 49.5287727776674 49.5292574247397 49.5296778375853 49.5298588475581 49.5302967721393 49.5304369071767 49.5304592844042 49.5304661019256 49.5304894577121 49.5306003975459 49.5308748265792 49.5308748265792 49.5308105986457 49.5308105986457 49.5308047597385 49.5307463706278 NaN];
Latitude = [7.92334633371693 7.92333733369920 7.92310333323818 7.92292333288354 7.92268033240478 7.92250033205015 7.92222133150046 7.92228433162458 7.92229333164232 7.92213669574119 7.92203233112809 7.92188833084439 7.92170833048975 7.92139332986914 7.92114132937265 7.92089832889389 7.92058332827328 7.91965632644691 7.91927486806551 7.91927832570217 7.91931432577310 7.91932332579083 7.91928732571990 7.91925132564897 7.91922432559578 7.91918832552485 7.91918465813742 7.91925132564897 7.91944932603907 7.92009732731576 7.92196933100397 7.92224833155366 7.92313033329137 7.92331033364601 7.92334633371693 7.92334633371693 NaN];
geoplot(Longitude,Latitude, "b")
So now I looking to create a border around these map on the inside and outside of this boundry. Let say a boundry which is 10 meter apart from the main boundry.
Here is a example of how I want to do it.
If you see in the figure blue line is the actual boundry and red and black boundry is that I am trying to find a function for it.
Is there a way to do it ? I have tried similar methods but those where on the images which can reduce size but not sure how to do it in actual map.
Thankyou in advance. mapping toolbox, geomap, matlab MATLAB Answers — New Questions
How to convert .mat to .xls
Please help me out in a detail manner xlswrite command is not workingPlease help me out in a detail manner xlswrite command is not working Please help me out in a detail manner xlswrite command is not working xlswrite, convert MATLAB Answers — New Questions
How to get longitude and latitude?
Dear All,
I want to calculate longtitude and latitude for total electron content (TEC) using GNSS radio occulttaion (RO) data. I have the X-GPS, Y-GPS, and Z-GPS as well as X-LEO, Y-LEO, and Z-LEO. How can I calculate it in Matlab?Dear All,
I want to calculate longtitude and latitude for total electron content (TEC) using GNSS radio occulttaion (RO) data. I have the X-GPS, Y-GPS, and Z-GPS as well as X-LEO, Y-LEO, and Z-LEO. How can I calculate it in Matlab? Dear All,
I want to calculate longtitude and latitude for total electron content (TEC) using GNSS radio occulttaion (RO) data. I have the X-GPS, Y-GPS, and Z-GPS as well as X-LEO, Y-LEO, and Z-LEO. How can I calculate it in Matlab? plot MATLAB Answers — New Questions