Answered
Can anyone help me to perform an FFT from a text file, to rad/sec on x axis?
For a full discussion, see: <https://www.mathworks.com/help/releases/R2015a/matlab/ref/fft.html *|fft|*> (link). For your p...

8 years ago | 0

| accepted

Answered
Removing repeated values entirely from a vector
One approach: V = [1 1 2 3 4 4 5]; [Vu,~,ic] = unique(V); T = accumarray(ic, 1); Out = Vu(T == 1) Out = ...

8 years ago | 1

| accepted

Answered
Dimensions of arrays being concatenated are not consistent.
In this sequence you put a colon *|(:)|* instead of a semicolon *|(;)|*. This is likely throwing the error — 10,15,4.3301...

8 years ago | 0

| accepted

Answered
Solving trigonometric non-linear equations in MATLAB
Did you get acceptable results from whatever solver you used? If so, the message likely means that parameter variations in ...

8 years ago | 0

Answered
There are 21 x,y coordinates (input) and i need to include each of them in a function d=((x-40)^2+(y-12)^2)^0.5 and to store and display the each pair outputs separately
If you want to calculate *|‘d’|* every _combination_ of *|‘(x,y)’|*, you need to use *|meshgrid|*: [X,Y] = meshgrid(x, y);...

8 years ago | 0

Answered
Molweight function gives wrong values
I do not have the Bioinformatics Toolbox, so I cannot check this. The function may assume that a string of amino acids are ...

8 years ago | 1

| accepted

Answered
How to add array of data into a variable?says i wanna loop for 4times
You need to add a second dimension to *|‘myArray’|* to so what you want: N=4; for i=1:N myArray(i,:) = [i+1 i+2]...

8 years ago | 1

| accepted

Answered
3D plot for repetitive data
your data are gridded, so you can use the *|reshape|* function to convert them to the necessary matrices to plot them with *|sur...

8 years ago | 0

| accepted

Answered
how can i divide a circle into 15 equal sectors in matlab?
This works: a = linspace(0, 2*pi, 150); r = 1; x = r*cos(a); y = r*sin(a); figure(1) plot(x, y) hold...

8 years ago | 0

| accepted

Answered
Need help plotting this
Two related problems are that the *|‘y1’|* and *|‘y2’|* functions do not use their arguments in their calculations. (I would al...

8 years ago | 1

| accepted

Answered
contour plot of 3 vectors
Probably the easiest option is to use the <https://www.mathworks.com/help/matlab/ref/griddata.html *|griddata|*> (link) function...

8 years ago | 1

| accepted

Answered
How to design blades in Matlab
Only the blades are going to be a problem, since the rest of the shapes appear to be straightforward. See: <https://www.mathwor...

8 years ago | 0

| accepted

Answered
Solve two equations simultaneously
I am _guessing_ here. I would subtract the surfaces, then you the <https://www.mathworks.com/help/matlab/ref/contour.html *|con...

8 years ago | 1

Answered
how can i integrate exponential function ?
Use a symbolic function (in *|R2012a|* and later versions): syms y1 y2 b1x b2x s11 s22 s12 s k t q = s11*(b1x ...

8 years ago | 0

Answered
Is there a semilogx function for symbolic functions?
Use the *|set|* function with *|fplot|* to adjust the axis scaling: syms x(t) x(t) = exp(-2*t); figure(1) ...

8 years ago | 3

Answered
Translating a hemisphere in 3D
Try this: [x1,y1,z1]=sphere; x1=x1(11:end,:); y1=y1(11:end,:); z1=z1(11:end,:); r=10; figure sf=surf...

8 years ago | 1

| accepted

Answered
Trying to plot a periodic function
*First*, MATLAB requires that subscripts (and indices) be integers greater than zero, so using *|‘t’|* as an index variable will...

8 years ago | 0

Answered
I am trying to solve and simulate an epidemic model using ODE 45 with a guide provided from a textbook: Below are the list of functions i have defined:
You need to save your *|‘SMVI’|* function as *|SMVI.m|* on your MATLAB search path: function dydt = SMVI(t,y) A = 1...

8 years ago | 0

| accepted

Answered
How can I prepare the EEG data before applying SVM algorithm?
I would search <http://www.ncbi.nlm.nih.gov/pubmed/ *PubMed*> for "brain computer interface" to start with. Also search on "Emo...

8 years ago | 0

Answered
Can anyone please tell what the below code does?
It reads the *|'title.wav|* file, and returns a *|(Nx2)|* matrix *|‘y’|*, and sampling _frequency_ *|‘fs’|*. It selects the lef...

8 years ago | 0

| accepted

Answered
How to fix "Subscripted assignment dimension mismatch," in a for loop?
I cannot run your code because I do not have the constants. Your guess may be correct. However saving *|‘W_TO’|* as a cell...

8 years ago | 0

Answered
ODE with goniometric function
This works in *|R2018a|*, although it gives a ‘Warning’ about array inputs: syms x y(x) D1y = diff(y); D2y = diff(D...

8 years ago | 0

Answered
How can I find roots of cubic function?
One approach: syms x y Eqn = y^3 - (x+50)*y^2 +(500*x -5200)*y + (3600*x) == 0; X = solve(Eqn, x) X_fcn = matlab...

8 years ago | 0

Answered
separate date and time from a .txt file with no spaces
This will work for the file you attached, to read the dates, times, and wind speeds: fidi = fopen('CMTI2.txt','rt'); DC...

8 years ago | 0

Answered
how to solve this equatinequation
Consider using the <https://www.mathworks.com/help/matlab/ref/fzero.html *|fzero|*> (link) function.

8 years ago | 0

Answered
multiple colours in a trajectory plot
Try this: X = [(0:50)' sin((0:50)*pi/10)']; % Create ‘X’ cm = colormap(jet); ...

8 years ago | 1

| accepted

Answered
I recieve the following error: 'Error using size. Not enough input arguments'. How can I correct this?
You have to use parentheses *|()|* rather than square brackets *|[]|* for function call arguments (and subscripts). Try thi...

8 years ago | 0

Answered
How to find (x,y) for peaks of a plot?
The second output are the vector indices corresponding to the identified peaks. If you want to find the *|‘r’|* coordinate corr...

8 years ago | 1

Answered
Table with date and x need to plot graph
One approach: [F,S,R] = xlsread('Matlabhelp.csv'); Final = table(F(:,1),F(:,2),F(:,3), 'VariableNames',{'Date','X','Y'}...

8 years ago | 0

| accepted

Load more