Tag Archives: matlab
How to find peaks in timeseries data?
I am using following matlab lines to find number of peaks in NDVI time series. However, it is not giving any peak value in timeseries data.
for i = 1:size(ndvi_data, 1)
location_data = ndvi_data(i, :);
pks, locs, ~, prominences] = findpeaks(location_data, ‘MinPeakProminence’, 0.1, ‘MinPeakHeight’,0.35, ‘MinPeakDistance’, 5);
num_peaks = numel(pks);
disp(num_peaks);
I am attaching input data file and request you to please suggest me how to find the peaks in ndvi time series data.I am using following matlab lines to find number of peaks in NDVI time series. However, it is not giving any peak value in timeseries data.
for i = 1:size(ndvi_data, 1)
location_data = ndvi_data(i, :);
pks, locs, ~, prominences] = findpeaks(location_data, ‘MinPeakProminence’, 0.1, ‘MinPeakHeight’,0.35, ‘MinPeakDistance’, 5);
num_peaks = numel(pks);
disp(num_peaks);
I am attaching input data file and request you to please suggest me how to find the peaks in ndvi time series data. I am using following matlab lines to find number of peaks in NDVI time series. However, it is not giving any peak value in timeseries data.
for i = 1:size(ndvi_data, 1)
location_data = ndvi_data(i, :);
pks, locs, ~, prominences] = findpeaks(location_data, ‘MinPeakProminence’, 0.1, ‘MinPeakHeight’,0.35, ‘MinPeakDistance’, 5);
num_peaks = numel(pks);
disp(num_peaks);
I am attaching input data file and request you to please suggest me how to find the peaks in ndvi time series data. how to find peaks in timeseries data? MATLAB Answers — New Questions
strfind returns empty cell despite that the strings contain same characters
I have big data file which I mapped using memmapfile and then change it to char. then I randomly generate a number and check whether the data contain this number using strfind. Although the generated number is within the data, command returns empty array.
datamap=memmapfile(‘file.txt’);
datachar=transpose(char(datamap.Data));
r = (r2-r1).*rand(1,1) + r1; %random number in range r1 r2
strfind(num2str(r),datachar)
I also tried sprintf to make sure both inputs are strings. when I inserted sprintf(datachar) I got warning: Control Character ” is not valid. See ‘doc sprintf’ for control characters
valid in the format string. … not sure if this can cause the problem. the data set contains numbers, strings, t for tabulator, n for end of the row and N which should be handled as string but might cause a problem…?
Thanks for any suggestions.I have big data file which I mapped using memmapfile and then change it to char. then I randomly generate a number and check whether the data contain this number using strfind. Although the generated number is within the data, command returns empty array.
datamap=memmapfile(‘file.txt’);
datachar=transpose(char(datamap.Data));
r = (r2-r1).*rand(1,1) + r1; %random number in range r1 r2
strfind(num2str(r),datachar)
I also tried sprintf to make sure both inputs are strings. when I inserted sprintf(datachar) I got warning: Control Character ” is not valid. See ‘doc sprintf’ for control characters
valid in the format string. … not sure if this can cause the problem. the data set contains numbers, strings, t for tabulator, n for end of the row and N which should be handled as string but might cause a problem…?
Thanks for any suggestions. I have big data file which I mapped using memmapfile and then change it to char. then I randomly generate a number and check whether the data contain this number using strfind. Although the generated number is within the data, command returns empty array.
datamap=memmapfile(‘file.txt’);
datachar=transpose(char(datamap.Data));
r = (r2-r1).*rand(1,1) + r1; %random number in range r1 r2
strfind(num2str(r),datachar)
I also tried sprintf to make sure both inputs are strings. when I inserted sprintf(datachar) I got warning: Control Character ” is not valid. See ‘doc sprintf’ for control characters
valid in the format string. … not sure if this can cause the problem. the data set contains numbers, strings, t for tabulator, n for end of the row and N which should be handled as string but might cause a problem…?
Thanks for any suggestions. strfind sprintf num2str string MATLAB Answers — New Questions
How to apply PCA correctly?
Hello
I’m currently struggling with PCA and Matlab. Let’s say we have a data matrix X and a response y (classification task). X consists of 12 rows and 4 columns. The rows are the data points, the columns are the predictors (features).
Now, I can do PCA with the following command:
[coeff, score] = pca(X);
As I understood from the matlab documentation, coeff contains the loadings and score contains the principal components in the columns. That mean first column of score contains the first principal component (associated with the highest variance) and the first column of coeff contains the loadings for the first principal component.
Is this correct?
But if this is correct, why is then X * coeff not equal to score?Hello
I’m currently struggling with PCA and Matlab. Let’s say we have a data matrix X and a response y (classification task). X consists of 12 rows and 4 columns. The rows are the data points, the columns are the predictors (features).
Now, I can do PCA with the following command:
[coeff, score] = pca(X);
As I understood from the matlab documentation, coeff contains the loadings and score contains the principal components in the columns. That mean first column of score contains the first principal component (associated with the highest variance) and the first column of coeff contains the loadings for the first principal component.
Is this correct?
But if this is correct, why is then X * coeff not equal to score? Hello
I’m currently struggling with PCA and Matlab. Let’s say we have a data matrix X and a response y (classification task). X consists of 12 rows and 4 columns. The rows are the data points, the columns are the predictors (features).
Now, I can do PCA with the following command:
[coeff, score] = pca(X);
As I understood from the matlab documentation, coeff contains the loadings and score contains the principal components in the columns. That mean first column of score contains the first principal component (associated with the highest variance) and the first column of coeff contains the loadings for the first principal component.
Is this correct?
But if this is correct, why is then X * coeff not equal to score? pca, principal component analysis, dimension reduction MATLAB Answers — New Questions
How to use array indexing with input dialog
Dear MatLab Community, I am trying to use input dialog for indexing my array. The indexing is not a problem with numbers, however, when I try to give 1:end as default answer, the behavior of str2double I do not understand, and it does not work for me.
Any suggestions are highly appreciated.
Thank you
lgDear MatLab Community, I am trying to use input dialog for indexing my array. The indexing is not a problem with numbers, however, when I try to give 1:end as default answer, the behavior of str2double I do not understand, and it does not work for me.
Any suggestions are highly appreciated.
Thank you
lg Dear MatLab Community, I am trying to use input dialog for indexing my array. The indexing is not a problem with numbers, however, when I try to give 1:end as default answer, the behavior of str2double I do not understand, and it does not work for me.
Any suggestions are highly appreciated.
Thank you
lg input dialog, indexing, 1:end, str2double MATLAB Answers — New Questions
Intersection of Discretized Curves
Hi,
I have a scatter plot of two curves.
The curves intersect each other and ideally they should have one or more intersection points.
However, as I have discrete points and two curves do not intersect at any of those points, I can not get the point of intersection.
I’m attaching a figure for more clarity.
I believe I will have a set of points here instead a single point.
How do I get those set of points from the scatter plot data or the data points I have now?
Thanks..Hi,
I have a scatter plot of two curves.
The curves intersect each other and ideally they should have one or more intersection points.
However, as I have discrete points and two curves do not intersect at any of those points, I can not get the point of intersection.
I’m attaching a figure for more clarity.
I believe I will have a set of points here instead a single point.
How do I get those set of points from the scatter plot data or the data points I have now?
Thanks.. Hi,
I have a scatter plot of two curves.
The curves intersect each other and ideally they should have one or more intersection points.
However, as I have discrete points and two curves do not intersect at any of those points, I can not get the point of intersection.
I’m attaching a figure for more clarity.
I believe I will have a set of points here instead a single point.
How do I get those set of points from the scatter plot data or the data points I have now?
Thanks.. curve intersection, plot, intersection set MATLAB Answers — New Questions
calulate the indicated mean pressure with a p-v diagramm
Hello,
I have to calculate the indicated mean pressure. I have a p-v diagramm (in the attachements). I separated the two areas by finding the intersection. But know im not sure if the polyarea() function is the correct function to calculate the two areas.
The integral i have to implement is also in the attachements
(p: pressure in the cylinder; A: piston surface; V: volume of the cylinder; s: piston travel (path) as a function of the crank angle
Thanks for help!Hello,
I have to calculate the indicated mean pressure. I have a p-v diagramm (in the attachements). I separated the two areas by finding the intersection. But know im not sure if the polyarea() function is the correct function to calculate the two areas.
The integral i have to implement is also in the attachements
(p: pressure in the cylinder; A: piston surface; V: volume of the cylinder; s: piston travel (path) as a function of the crank angle
Thanks for help! Hello,
I have to calculate the indicated mean pressure. I have a p-v diagramm (in the attachements). I separated the two areas by finding the intersection. But know im not sure if the polyarea() function is the correct function to calculate the two areas.
The integral i have to implement is also in the attachements
(p: pressure in the cylinder; A: piston surface; V: volume of the cylinder; s: piston travel (path) as a function of the crank angle
Thanks for help! p-v diagram, calulation, polyarea MATLAB Answers — New Questions
No access to model labels in ECU TEST tool
I have currently used simulink realtime code generator to build my plant model. The ECU test tool is now connected and configured with the model.mldatx file and it is running. But the issue is, I dont have access to any of the model labels in the model access tab of ECU TEST tool. Without this, i do not have the option to manipulate or read signals from the plant model
Could anyone help me resolve this issue?
Thank you,
Best regards,
DhivyaI have currently used simulink realtime code generator to build my plant model. The ECU test tool is now connected and configured with the model.mldatx file and it is running. But the issue is, I dont have access to any of the model labels in the model access tab of ECU TEST tool. Without this, i do not have the option to manipulate or read signals from the plant model
Could anyone help me resolve this issue?
Thank you,
Best regards,
Dhivya I have currently used simulink realtime code generator to build my plant model. The ECU test tool is now connected and configured with the model.mldatx file and it is running. But the issue is, I dont have access to any of the model labels in the model access tab of ECU TEST tool. Without this, i do not have the option to manipulate or read signals from the plant model
Could anyone help me resolve this issue?
Thank you,
Best regards,
Dhivya simulink, ecu-test MATLAB Answers — New Questions
How can I calculate in MATLAB-the electric field due to a time varying magentic field for a simple geometry?
I have a problem of electromagentic modeling. The problem involves a current carrying circular coil where the current will be varied with time. Calculating the magnetic field was relatively simpler – I used Bio-Savart’s law & the superposition theory. But I am facing some difficulty calculating the electric field that arises from the time varying magnetic field, specifically, I didn’t know how to implement Maxwell’s equation numerically. I would appreciate any help in any form, however, after much speculation, I finished writing my first script of calculating the electric field. I amm attaching the vector plot of the electromagnetic field distribution in a 3D volume. I am also attaching the .fig file of the corresponding plot so anyone interested can maneuver plot as they like. I would like to know if the electric field I calculated is correct.I have a problem of electromagentic modeling. The problem involves a current carrying circular coil where the current will be varied with time. Calculating the magnetic field was relatively simpler – I used Bio-Savart’s law & the superposition theory. But I am facing some difficulty calculating the electric field that arises from the time varying magnetic field, specifically, I didn’t know how to implement Maxwell’s equation numerically. I would appreciate any help in any form, however, after much speculation, I finished writing my first script of calculating the electric field. I amm attaching the vector plot of the electromagnetic field distribution in a 3D volume. I am also attaching the .fig file of the corresponding plot so anyone interested can maneuver plot as they like. I would like to know if the electric field I calculated is correct. I have a problem of electromagentic modeling. The problem involves a current carrying circular coil where the current will be varied with time. Calculating the magnetic field was relatively simpler – I used Bio-Savart’s law & the superposition theory. But I am facing some difficulty calculating the electric field that arises from the time varying magnetic field, specifically, I didn’t know how to implement Maxwell’s equation numerically. I would appreciate any help in any form, however, after much speculation, I finished writing my first script of calculating the electric field. I amm attaching the vector plot of the electromagnetic field distribution in a 3D volume. I am also attaching the .fig file of the corresponding plot so anyone interested can maneuver plot as they like. I would like to know if the electric field I calculated is correct. electromagnetic, maxwell’s equation MATLAB Answers — New Questions
Design service for LQR controller for unknown system based on available Multiple Inputs and Multiple Output data
I am working on a project that require designing a MIMO temperature controller. I have very limited control experiences. Multiple inputs and multiple output data are available.I am working on a project that require designing a MIMO temperature controller. I have very limited control experiences. Multiple inputs and multiple output data are available. I am working on a project that require designing a MIMO temperature controller. I have very limited control experiences. Multiple inputs and multiple output data are available. lqr, system identification MATLAB Answers — New Questions
Exported 3D plot into SVG shows swirly white lines between chopped subshapes in inkscape
when i export the 3D figures into svg using the following line
print(fig2,’LQF_axis’,’-dsvg’,’-painters’);
svg file is generated and when i open it in Inkscape, there are some swirly white lines separating subshapes. It seems that the vector graphics chopped into pieces in not efficient way and therefore while lines are to be seen.
the problem i have it only with surface,
s=surf(X,Y,LQF_axis’,’FaceColor’,’flat’,’LineStyle’,’-‘,’EdgeColor’,’k’);hold on;
is there a way to get rid of these annoyed white lines in the exported svg file or to make a better connection of thiny chopped pieces genereted from the print command?when i export the 3D figures into svg using the following line
print(fig2,’LQF_axis’,’-dsvg’,’-painters’);
svg file is generated and when i open it in Inkscape, there are some swirly white lines separating subshapes. It seems that the vector graphics chopped into pieces in not efficient way and therefore while lines are to be seen.
the problem i have it only with surface,
s=surf(X,Y,LQF_axis’,’FaceColor’,’flat’,’LineStyle’,’-‘,’EdgeColor’,’k’);hold on;
is there a way to get rid of these annoyed white lines in the exported svg file or to make a better connection of thiny chopped pieces genereted from the print command? when i export the 3D figures into svg using the following line
print(fig2,’LQF_axis’,’-dsvg’,’-painters’);
svg file is generated and when i open it in Inkscape, there are some swirly white lines separating subshapes. It seems that the vector graphics chopped into pieces in not efficient way and therefore while lines are to be seen.
the problem i have it only with surface,
s=surf(X,Y,LQF_axis’,’FaceColor’,’flat’,’LineStyle’,’-‘,’EdgeColor’,’k’);hold on;
is there a way to get rid of these annoyed white lines in the exported svg file or to make a better connection of thiny chopped pieces genereted from the print command? svg, inkscape, renderer, painters, dsvg, print, surf, figure, export MATLAB Answers — New Questions
Spacecraft Dynamics Block not matching intuition
I am using the spacecraft dynamics block in Simulink.
I am giving two nonzero moment inputs as shown below in one of the attached screenshots. It is just a PRBS input for both.
However, my angular velocity output looks like the next attached photo.
How is it that my angular velocities are all going negative and becoming larger in magnitude negative as time goes on when the input is swinging negative and positive? You would think that the input given would cause the spacecraft to essentially wobble back and forth, but instead we see it abruptly start to spin one direction and spin faster and faster in that same direction as time goes on. This does not match my intuition and makes me think something is wrong. I would really appreciate if someone could clarify.I am using the spacecraft dynamics block in Simulink.
I am giving two nonzero moment inputs as shown below in one of the attached screenshots. It is just a PRBS input for both.
However, my angular velocity output looks like the next attached photo.
How is it that my angular velocities are all going negative and becoming larger in magnitude negative as time goes on when the input is swinging negative and positive? You would think that the input given would cause the spacecraft to essentially wobble back and forth, but instead we see it abruptly start to spin one direction and spin faster and faster in that same direction as time goes on. This does not match my intuition and makes me think something is wrong. I would really appreciate if someone could clarify. I am using the spacecraft dynamics block in Simulink.
I am giving two nonzero moment inputs as shown below in one of the attached screenshots. It is just a PRBS input for both.
However, my angular velocity output looks like the next attached photo.
How is it that my angular velocities are all going negative and becoming larger in magnitude negative as time goes on when the input is swinging negative and positive? You would think that the input given would cause the spacecraft to essentially wobble back and forth, but instead we see it abruptly start to spin one direction and spin faster and faster in that same direction as time goes on. This does not match my intuition and makes me think something is wrong. I would really appreciate if someone could clarify. aerospace toolbox, spacecraft dynamics MATLAB Answers — New Questions
Find data in table outside of prediction intervals
I have a table T, and I am fitting two of the variables with an exponntial function. I would like to identify any points that lie outside of my prediction interval from the fit, and return the complete row in table T.
I am using fit to make the exponential fit and find the confidence bounds. In my example, there are two datapoints that lie outside the prediction interval, and I would like to know what rows they are in T.
Example table is attached, thanks!
load example_table.mat
T=sortrows(T,"Xdata");
x=T.Xdata;
y=T.Ydata;
fitresult = fit(x,y,’exp1′)
pred = predint(fitresult,x,0.95);
plot(fitresult,x,y)
hold on
plot(x,pred,’m–‘)
legend({‘Data’,’Fitted curve’, ‘Prediction intervals’},…
‘FontSize’,8,’Location’,’northwest’)I have a table T, and I am fitting two of the variables with an exponntial function. I would like to identify any points that lie outside of my prediction interval from the fit, and return the complete row in table T.
I am using fit to make the exponential fit and find the confidence bounds. In my example, there are two datapoints that lie outside the prediction interval, and I would like to know what rows they are in T.
Example table is attached, thanks!
load example_table.mat
T=sortrows(T,"Xdata");
x=T.Xdata;
y=T.Ydata;
fitresult = fit(x,y,’exp1′)
pred = predint(fitresult,x,0.95);
plot(fitresult,x,y)
hold on
plot(x,pred,’m–‘)
legend({‘Data’,’Fitted curve’, ‘Prediction intervals’},…
‘FontSize’,8,’Location’,’northwest’) I have a table T, and I am fitting two of the variables with an exponntial function. I would like to identify any points that lie outside of my prediction interval from the fit, and return the complete row in table T.
I am using fit to make the exponential fit and find the confidence bounds. In my example, there are two datapoints that lie outside the prediction interval, and I would like to know what rows they are in T.
Example table is attached, thanks!
load example_table.mat
T=sortrows(T,"Xdata");
x=T.Xdata;
y=T.Ydata;
fitresult = fit(x,y,’exp1′)
pred = predint(fitresult,x,0.95);
plot(fitresult,x,y)
hold on
plot(x,pred,’m–‘)
legend({‘Data’,’Fitted curve’, ‘Prediction intervals’},…
‘FontSize’,8,’Location’,’northwest’) curve fitting MATLAB Answers — New Questions
whats this block in matlab simulink
Hi everyone I want to know whats this block is (the one i show with green arrow)Hi everyone I want to know whats this block is (the one i show with green arrow) Hi everyone I want to know whats this block is (the one i show with green arrow) matlab, simulink, identify a block MATLAB Answers — New Questions
Need urgent help in multivariate analysis
Hi, i need urgent help to validate this data. I’m trying to used meshgrid to plot but the figure is somehow kind of weird. please help..thanks.;
x1=[28.1000000000000;28.3100000000000;28.7700000000000;29.9200000000000;29.9800000000000;29.7300000000000;29.4500000000000;29.4500000000000;29.3000000000000;30.1900000000000;29.0300000000000;28.8300000000000];
x2=[15.9800000000000;2.93000000000000;0.930000000000000;1.46000000000000;3.89000000000000;2.57000000000000;5.66000000000000;9.92000000000000;8.57000000000000;4.45000000000000;37.9700000000000;34.3300000000000];
y=[28.2000000000000;29.0800000000000;30.5300000000000;32.2100000000000;32.3000000000000;32.1300000000000;31.4200000000000;31.4400000000000;31.0100000000000;31.4200000000000;29.3700000000000;28.6800000000000];
X = [ones(size(x1)) x1 x2 x1.*x2];
b = regress(y,X) % Removes NaN data
b =
-9.5805
1.3901
-1.3429
0.0449
>> [~,~,~,~,stats] = regress(y,X)
stats =
0.9269 33.8380 0.0001 0.2126
>> sin(X)
ans =
0.8415 0.1735 -0.2687 0.2082
0.8415 -0.0357 0.2100 0.9542
0.8415 -0.4756 0.8016 0.9986
0.8415 -0.9972 0.9939 -0.2947
0.8415 -0.9909 -0.6805 -0.3740
0.8415 -0.9934 0.5410 0.8457
0.8415 -0.9229 -0.5836 -0.1816
0.8415 -0.9229 -0.4752 0.0241
0.8415 -0.8551 0.7544 -0.2245
0.8415 -0.9411 -0.9658 0.6765
0.8415 -0.6858 0.2676 0.4168
0.8415 -0.5275 0.2256 -0.1318
>> y = sin(X);
X = linspace(0,0.5*pi);
>> y = X’;
z = X .* exp(-X.^2 – y.^2);
surf(X,y,z)
>> xlabel(‘air temperature’)
ylabel(‘total rainfall’)
ylabel(‘total rainfall’)
zlabel(‘water temperature’)
view(50,10)Hi, i need urgent help to validate this data. I’m trying to used meshgrid to plot but the figure is somehow kind of weird. please help..thanks.;
x1=[28.1000000000000;28.3100000000000;28.7700000000000;29.9200000000000;29.9800000000000;29.7300000000000;29.4500000000000;29.4500000000000;29.3000000000000;30.1900000000000;29.0300000000000;28.8300000000000];
x2=[15.9800000000000;2.93000000000000;0.930000000000000;1.46000000000000;3.89000000000000;2.57000000000000;5.66000000000000;9.92000000000000;8.57000000000000;4.45000000000000;37.9700000000000;34.3300000000000];
y=[28.2000000000000;29.0800000000000;30.5300000000000;32.2100000000000;32.3000000000000;32.1300000000000;31.4200000000000;31.4400000000000;31.0100000000000;31.4200000000000;29.3700000000000;28.6800000000000];
X = [ones(size(x1)) x1 x2 x1.*x2];
b = regress(y,X) % Removes NaN data
b =
-9.5805
1.3901
-1.3429
0.0449
>> [~,~,~,~,stats] = regress(y,X)
stats =
0.9269 33.8380 0.0001 0.2126
>> sin(X)
ans =
0.8415 0.1735 -0.2687 0.2082
0.8415 -0.0357 0.2100 0.9542
0.8415 -0.4756 0.8016 0.9986
0.8415 -0.9972 0.9939 -0.2947
0.8415 -0.9909 -0.6805 -0.3740
0.8415 -0.9934 0.5410 0.8457
0.8415 -0.9229 -0.5836 -0.1816
0.8415 -0.9229 -0.4752 0.0241
0.8415 -0.8551 0.7544 -0.2245
0.8415 -0.9411 -0.9658 0.6765
0.8415 -0.6858 0.2676 0.4168
0.8415 -0.5275 0.2256 -0.1318
>> y = sin(X);
X = linspace(0,0.5*pi);
>> y = X’;
z = X .* exp(-X.^2 – y.^2);
surf(X,y,z)
>> xlabel(‘air temperature’)
ylabel(‘total rainfall’)
ylabel(‘total rainfall’)
zlabel(‘water temperature’)
view(50,10) Hi, i need urgent help to validate this data. I’m trying to used meshgrid to plot but the figure is somehow kind of weird. please help..thanks.;
x1=[28.1000000000000;28.3100000000000;28.7700000000000;29.9200000000000;29.9800000000000;29.7300000000000;29.4500000000000;29.4500000000000;29.3000000000000;30.1900000000000;29.0300000000000;28.8300000000000];
x2=[15.9800000000000;2.93000000000000;0.930000000000000;1.46000000000000;3.89000000000000;2.57000000000000;5.66000000000000;9.92000000000000;8.57000000000000;4.45000000000000;37.9700000000000;34.3300000000000];
y=[28.2000000000000;29.0800000000000;30.5300000000000;32.2100000000000;32.3000000000000;32.1300000000000;31.4200000000000;31.4400000000000;31.0100000000000;31.4200000000000;29.3700000000000;28.6800000000000];
X = [ones(size(x1)) x1 x2 x1.*x2];
b = regress(y,X) % Removes NaN data
b =
-9.5805
1.3901
-1.3429
0.0449
>> [~,~,~,~,stats] = regress(y,X)
stats =
0.9269 33.8380 0.0001 0.2126
>> sin(X)
ans =
0.8415 0.1735 -0.2687 0.2082
0.8415 -0.0357 0.2100 0.9542
0.8415 -0.4756 0.8016 0.9986
0.8415 -0.9972 0.9939 -0.2947
0.8415 -0.9909 -0.6805 -0.3740
0.8415 -0.9934 0.5410 0.8457
0.8415 -0.9229 -0.5836 -0.1816
0.8415 -0.9229 -0.4752 0.0241
0.8415 -0.8551 0.7544 -0.2245
0.8415 -0.9411 -0.9658 0.6765
0.8415 -0.6858 0.2676 0.4168
0.8415 -0.5275 0.2256 -0.1318
>> y = sin(X);
X = linspace(0,0.5*pi);
>> y = X’;
z = X .* exp(-X.^2 – y.^2);
surf(X,y,z)
>> xlabel(‘air temperature’)
ylabel(‘total rainfall’)
ylabel(‘total rainfall’)
zlabel(‘water temperature’)
view(50,10) meshgrid, matlab, matlab code MATLAB Answers — New Questions
How to animate a mechanism?
in this attached code i want to vary theta1 and theta2 from 0 to 360 deg at same rate and want to plot updated positions of ain,bin,cin while o2,o4 are fixed on axes input_axis and output_axes respectively.
it is a 3d mechanism,ain is rotating about input_axis and bin is rotating about output_axis and cin is also updating which joins to updated positions of ain and bin.
Please someone tell ,how to animate this mechanism properly!!
Thanksin this attached code i want to vary theta1 and theta2 from 0 to 360 deg at same rate and want to plot updated positions of ain,bin,cin while o2,o4 are fixed on axes input_axis and output_axes respectively.
it is a 3d mechanism,ain is rotating about input_axis and bin is rotating about output_axis and cin is also updating which joins to updated positions of ain and bin.
Please someone tell ,how to animate this mechanism properly!!
Thanks in this attached code i want to vary theta1 and theta2 from 0 to 360 deg at same rate and want to plot updated positions of ain,bin,cin while o2,o4 are fixed on axes input_axis and output_axes respectively.
it is a 3d mechanism,ain is rotating about input_axis and bin is rotating about output_axis and cin is also updating which joins to updated positions of ain and bin.
Please someone tell ,how to animate this mechanism properly!!
Thanks #animation, #mechanism MATLAB Answers — New Questions
How to run “fitrsvm” command in Matlab R2014b?
I am currently using Matlab R2014b, it doent support command "fitrsvm". I have to use Support Vector Machine. Kindly suggest me, how can i run my code using this command? As I am using this older version of Matlab.
Thank you.I am currently using Matlab R2014b, it doent support command "fitrsvm". I have to use Support Vector Machine. Kindly suggest me, how can i run my code using this command? As I am using this older version of Matlab.
Thank you. I am currently using Matlab R2014b, it doent support command "fitrsvm". I have to use Support Vector Machine. Kindly suggest me, how can i run my code using this command? As I am using this older version of Matlab.
Thank you. svm, svr, support vector machine, r2014b MATLAB Answers — New Questions
Change localized help to English
When opening the documentation in Matlab (e.g., by typing "doc subplot" the command window), Matlab opens a localized, i.e., German, version of the online help (because I am based in Germany). My Matlab UI is in English, though.
Is there a way to set the language of the online help to English, such that it automatically always displays the English content?When opening the documentation in Matlab (e.g., by typing "doc subplot" the command window), Matlab opens a localized, i.e., German, version of the online help (because I am based in Germany). My Matlab UI is in English, though.
Is there a way to set the language of the online help to English, such that it automatically always displays the English content? When opening the documentation in Matlab (e.g., by typing "doc subplot" the command window), Matlab opens a localized, i.e., German, version of the online help (because I am based in Germany). My Matlab UI is in English, though.
Is there a way to set the language of the online help to English, such that it automatically always displays the English content? language, help, documentation MATLAB Answers — New Questions