Answered
For loop not executed correctly
for n=1:3 *instead of* q=fsolve(@thrustandangle,guess) *put* q=fsolve(@thrustanglereq,guess)

8 years ago | 0

| accepted

Answered
Combine 4 graphs into 1
just alter it as mentioned below:(see attached screenshot) figure plot(x1,v1(x1),'Color','r','LineWidth',2) hold on plot...

8 years ago | 0

| accepted

Answered
Computing the average across columns, while discounting a specific column
Not sure what you mean but a guess: x=rand(4) x(:,2)=[] %removes second column mean(x,1)

8 years ago | 0

Answered
Read specific string from multiple .txt file and output in new .txt file
fid=fopen('sample.txt','r') file=textscan(fid,'%s \n','Delimiter','') fclose(fid) file{1}{3}

8 years ago | 1

| accepted

Answered
I am getting the error unable to perform assignment because the size of the left side is 3-by-1 and the size of the right side is 4-by-1.
for n=4:length(t) (Keff.^1).*(F0-((K-(2/ct^2).*M).*displacement(n-1))-((((1/ct^2).*M)-(1/(2.*ct)).*C).*displacement(n-2))) ...

8 years ago | 0

Answered
Cubic Splines for Interpolation
since you didn't provide any details see <https://in.mathworks.com/help/curvefit/examples/cubic-spline-interpolation.html csapi ...

8 years ago | 0

Answered
R^2 value of function
similar question which has an answer , read the link below: <https://in.mathworks.com/matlabcentral/answers/158659-logarithmi...

8 years ago | 0

Answered
How to graph perpendicular lines?
Use my file exchange: <https://in.mathworks.com/matlabcentral/fileexchange/67603-vertical-line>

8 years ago | 0

Answered
MATRIX Q31 IS POSTED INDEFINED IN MATLAB BUT WHEN I EXECUTE IT ALONE IT WORKS?
Perhaps you should type it as G31 ,a typo? Because in the file G31 corresponds to your Q31

8 years ago | 0

Answered
If statement within a while loop within a function to find min f(x) value reached?
x=2 f_min=12 N=myfxterms(x,f_min) function [N]=myfxterms(x,f_min) N=0; f=0; while f<f_min...

8 years ago | 0

Answered
How can I write equation?
x=[0,0.1,0.5,0.9] y=linspace(0,2*pi,numel(x)) r=(1-x.^2)./(1-x.*cos(y)) plot(y,r,'-*b')

8 years ago | 0

| accepted

Answered
My Newton Raphson Method only displays the result. I would like it to display all iterations. How do I do this?
%syms x; f=@(x)(x.^5)-83; %before loop df=@(x)5*(x.^4); F(i)=f(x) %inside loop Df(i)=df(x) *Make sure dt i...

8 years ago | 0

Answered
Assigning Multiple Files to a Variable Name
*Read the links below:* <https://in.mathworks.com/help/matlab/import_export/process-a-sequence-of-files.html> <https://in....

8 years ago | 0

Answered
How to create a 1x12 matrix of only .
a = [1;2;3]; b = [3;2;1]; idx = [a b] sprintf('%.f.%.f \n',idx') *EDITED*

8 years ago | 0

Answered
How to concatenate the rounded digits of a number and a string?
xstar=sprintf('%.2f%s',round(x,3,'significant'),star)

8 years ago | 0

| accepted

Answered
How to expand fully with complex numbers?
clear all %an example syms x polynomial=i*x-x.^2 %i indicates imaginary number a = coeffs(polynomial) ...

8 years ago | 0

| accepted

Answered
Get acceleration from displacement
y=displacement t=time velocity=diff(y)./diff(t) acceleration=diff(y,2)./diff(t,2)

8 years ago | 0

Answered
matlab particleswarm not found
*Read the links below:* <https://in.mathworks.com/matlabcentral/answers/336962-how-to-set-options-of-particleswarm?s_tid=a...

8 years ago | 0

| accepted

Answered
How can I combine matrices which contain characters instead of numbers?
>> A = 'University' B = 'is' C = 'nice' ABC={A,B,C}; strjoin(ABC) A = 'University' ...

8 years ago | 0

| accepted

Answered
Exporting to excel - xlswrite error
If you are using mac you can only write it in csv format. <https://www.mathworks.com/matlabcentral/answers/415718-how-to-expo...

8 years ago | 0

Answered
getting an error that attempt to run script as a function? what should be done to rectify?
You have saved *get_im_label* as a script instead of a function look into the error message as it clearly states the error. ...

8 years ago | 0

| accepted

Answered
change the origin of coordinates in a matlab graph
x=1:10 %an example use climate and ylim to set the origin y=x plot(x,y) xlim([1 10]) ylim([1 10]) figure() ...

8 years ago | 0

Answered
How to plot in 2D
x = [ 0 : 5 : 15 ] y = [ 6.1 6.02 5.98 6.02 ] Secrenario = x Location = y plot(Secrenario,Location,'r') xlim(...

8 years ago | 0

| accepted

Answered
ax=B format, matrices how would i go about this im new to matlab and am having trouble.
syms x y z eq1 = x + 2*y + 3*z == -8; eq2 = 1 - z == y; eq3 = x + y + 2*z + 1 == 0; eqns=[...

8 years ago | 1

| accepted

Answered
How do I convert the (n, n) matrix to a (nxn,1) vector? Any suggestions?
vertcat(A,A)

8 years ago | 0

| accepted

Answered
How to run a for loop with a string as loop index?
*To process sequence of files:* <https://www.mathworks.com/help/releases/R2013a/matlab/import_export/process-a-sequence-of-fi...

8 years ago | 1

| accepted

Answered
How can I plot fit for two curves in one graph?
x=[0.4 0.5 0.6 0.7 0.8 0.9 1 ]; y1=[32.6 58.4 76.38 84 79.43 61.26 28.05 ]; y2=[13.9 24.4 31.37 34.263 32.62...

8 years ago | 0

Answered
Fplot Axis not scaling corectly.
*An example:* h=fplot(x,[-20000 20000]) % from -20000 to 20000 the default is from -5 to 5 to change it you have to speci...

8 years ago | 0

| accepted

Answered
how to extract the license plate of cars?
This might help you <https://www.mathworks.com/matlabcentral/answers/264270-how-to-auto-crop-a-car-image-to-get-the-license-p...

8 years ago | 0

Answered
how to resolve this warning ?
As the error clearly states to rename your *function*. Just rename your function as *labindex1* and *numlabs1*.

8 years ago | 0

Load more