Answered
Finding an Equation to a set of Data
If that is a *NACA* airfoil, and you have the *|4|*-digit code for it, you can reproduce it (and as a bonus plot it in 3D) using...

8 years ago | 0

Answered
convert vector to matrix
Try this: A = [1,2,3,4,5,6]; B = reshape(A(:), 3, []).' B = 1 2 3 4 5 6

8 years ago | 0

| accepted

Answered
how to solve 'Index exceeds the number of array elements (1)'?
You need an operator here (I chose |‘*’| for multiplication): dec = -(dec0)*(pi/180)*cos(wI*(I+9)); ...

8 years ago | 0

| accepted

Answered
what does the x(10:15) mean?
This assignment: y_hat = x(10:15).'*x(4:9); if *|‘x’|* is a row vector, does matrix multiplication of the transposed *|...

8 years ago | 0

| accepted

Answered
How do I plot temperature distribution over a plate?
To begin, try this: y=[0;0;0;.1;.1;.1;.2;.2;.2]; x= [0;0.15;.3;.2;.4;.25;.5]; T=[578.6669;560.5492;539.8550;278.748...

8 years ago | 0

| accepted

Answered
how do I create this loop?
It _might_ be easier to use the <https://www.mathworks.com/help/matlab/ref/timetable2table.html *|timetable2table|*> (link) func...

8 years ago | 0

| accepted

Answered
How to convert a string data time to a number
Try this: dn = datenum('10/08/2018 6:30:32 PM', 'dd/mm/yyyy HH:MM:SS AM') q = datestr(dn) ...

8 years ago | 0

Answered
How do I store values from a for loop
*_‘What should I write to store it in vectors?’_* I would create *|‘x0v’|* and *|‘y0v’|* (for example) to store them: ...

8 years ago | 1

| accepted

Answered
The values in tspan must be increasing or decreasing
The *|‘phaseplane’|* and *|‘drawphase’|* functions are not MATLAB functions. Try this instead, using the <https://www.mathw...

8 years ago | 0

Answered
How to convert date/time from excel in 2 separate columns to a single date/time variable in matlab
One option: dn = [datenum({'08/09/2018'; '08/10/2018'}, 'mm/dd/yyyy') + rem(datenum({'04:12:32'; '04:12:35'}, 'HH:MM:S...

8 years ago | 1

Answered
How to write a function for fectorial
You might find the <https://www.mathworks.com/help/matlab/ref/cumprod.html *|cumprod|*> (link) function helpful.

8 years ago | 0

| accepted

Answered
Numerical derivative of points
I would use the <https://www.mathworks.com/help/matlab/ref/gradient.html *|gradient|*> (link) function. The output is the same ...

8 years ago | 1

| accepted

Answered
how to get value out of a loop and into a vector
You only need to save the interim value of *|‘E’|* (here *|‘Ev’|*). Saving every value of every vector will cause computational...

8 years ago | 0

| accepted

Answered
How to limit the contour plot to specific points?
See the documentation on <https://www.mathworks.com/help/matlab/ref/contour.html?s_tid=doc_ta#mw_9c3f97d0-50a9-4c6d-adf3-1d078ed...

8 years ago | 1

| accepted

Answered
User-defined function error
The only thing wrong is that you are likely not saving your function before you call it. Save it somewhere on your MATLAB u...

8 years ago | 0

Answered
Size of a function handle is not equal to YDATA
The most likely reason is that the data you are fitting are a row (column) vector, and the function is returning a column (row) ...

8 years ago | 1

Answered
Why is there an offset in my X axis in my subplots?
The problem is likely due to your using the *|pcolor|* function. It eliminates the last row and column from the matrix you are...

8 years ago | 0

| accepted

Answered
How to convert serial date numbers to date and time format in a timeseries?
Try this: start = '20-Aug-2018 07:25:13'; stop = '20-Aug-2018 11:42:54'; stop = '20-Aug-2018 07:25:15'; ...

8 years ago | 0

| accepted

Answered
Scatter Plot, Color on Z not differentiated as expected
Experiment with *|scatter3|* instead of *|scatter|*. (If you want a *|2D|* view, you can do that with the *|view|* function.) ...

8 years ago | 0

Answered
How to call multiple inputs for multiple variables.
My favorite is the <https://www.mathworks.com/help/matlab/ref/inputdlg.html *|inputdlg|*> (link) function.

8 years ago | 0

Answered
fit.m and sensitivity
I do not have the Curve Fitting Toolbox, however looking at the documentation for the *|fit|* function, the *|Jacobian|* variabl...

8 years ago | 0

Answered
how to plot complex functions of phase and amplitude
Try this: f = @(t) (1+0.25i).*t-2.0; t = linspace(0, 4); figure subplot(2,1,1) plot(t, abs(f(t))) title...

8 years ago | 12

| accepted

Answered
Unable to read MATLAB figure file *.fig in imread. The error is unable to determine file format.
To read *|‘.fig’|* files, use the <https://www.mathworks.com/help/matlab/ref/openfig.html *|openfig|*> (link) function, not *|im...

8 years ago | 0

| accepted

Answered
Low Pass filter for a recorded message.
If you have *|R2018a|* or later, the easiest way is to use the <https://www.mathworks.com/help/signal/ref/lowpass.html *|lowpas...

8 years ago | 0

Answered
tan function giving an error
Your code works when I run it. That you are getting the error: *|‘Array indices must be positive integers or logical values...

8 years ago | 0

| accepted

Answered
pvalue for rate of change
The File Exchange contribution <https://www.mathworks.com/matlabcentral/fileexchange/39126-polyparci *|polyparci|*> (link) will ...

8 years ago | 1

| accepted

Answered
Finding the nth term of the fibonacci sequence in matlab.
You have the correct approach. Try this: n = input("Enter value of n "); f = fib1(n) When this is then run, the...

8 years ago | 1

Answered
Need to solve this problem about hydrogen radial wavefunction
You must call *|‘’|* as a function, with arguments. You cannot run it using the green *‘Run’* triangle in the Editor. n ...

8 years ago | 0

Answered
can't get the subs command to work after Jacobian
You have to tell *|subs|* the expression in which to do the substitution: A_jacobi_n = subs(A_jacobi, {u1,u2,m1,m2,r,g,x1,...

8 years ago | 1

| accepted

Answered
how can i fix a double precision error "DOUBLE cannot convert the input expression into a double array." preciasly the error is at the calculation of a 4x4 matrix named T inside the second for loop
I created *|‘n’|* as a scalar, not a vector. Also, *|‘T’|* is *|(2x2)|* as you created it here. This version of your code ...

8 years ago | 0

Load more