Answered
How to get multiple 3D arrays into a cell array with similar dimensions?
Try this: C = cat(4, A, B); D = mat2cell(C, ones(1,size(C,1)), ones(1,size(C,2)), size(C,3), size(C,4)) When I check it with...

7 years ago | 0

Answered
Getting a specific row of a Table in Matlab
Try this: output = sortrows(Table,1) That should sort the entire table by the sort order of column 1. (It did when I experim...

7 years ago | 0

Answered
Removing char in a mixed string column so only numerical values are left?
If ‘LEDS’ is a cell array, try this: LEDS = {'LED114'; 'LED2'; 'LED49'}; LED_Nrs = regexp(LEDS, '\d*', 'match') Out = str2do...

7 years ago | 1

| accepted

Answered
Where can I see in the Matlab GUI which Update has been applied?
Click on the Help icon in the top toolbar, then About MATLAB. The version, Update, and other information will be displayed in t...

7 years ago | 0

| accepted

Answered
frequency equation for curve fitting
To do a nonlinear fit in the frequency domain, you will need to calculate a function that is the Fourier transform of the time-d...

7 years ago | 0

| accepted

Answered
Rank deficient error?
Since I assume that you want to do element-wise operations, not matrix division, in the ‘Toff’ calculation, remember to do eleme...

7 years ago | 0

Answered
How to plot function(s) with smooth curves
N = linspace(0, 1); This will produce a vector of 100 points between 0 and 1. See the documentation on linspace for details an...

7 years ago | 1

| accepted

Answered
Trouble with Shortcut to Matlab
If you don’t already have File Explorer on your desktop or toolbar/taskbar, click on the Windows logo on the left edge of the to...

7 years ago | 0

Answered
How to plot a piecewise in MATLAB?
I prefer the anonymous function approach: x = @(n) n.*((0<=n) & (n<=8)) + 1*((-4<=n) & (n<=-1)); n = -10:12; figure ste...

7 years ago | 2

| accepted

Answered
Homework Help using fsolve
I am not certain what you want to do. Try this slight variation on your code: Y = fsolve(@(y)func(x,y),x) It runs without ...

7 years ago | 1

Answered
Error : Output argument "y" (and maybe others) not assigned during call to "N".
The easiest way is to assign a value to ‘y’ at the outset. It will be re-assigned if the if blocks allow it. Example — fun...

7 years ago | 0

Answered
Sum two plots and plot the result
One approach (assuming that they are functions of the same independent variable vector, so in addition to being the same lengths...

7 years ago | 1

| accepted

Answered
A question about sorting a vector
It does not look correct to me, specifically because ‘Ys’ may not necessarily be an integer greater than 0, as required for subs...

7 years ago | 0

| accepted

Answered
Cumulative sinusoidal wave plotting
Subscript in the loop, and add the second subscript reference in your plot calls. Try this: f=1; t=-10:0.1:10; y2=zeros(s...

7 years ago | 1

| accepted

Answered
How to remove k = 3 that part?
k = Ques4; ↑

7 years ago | 0

Answered
How to find an intersection between two lines on a plot?
Try this: RL = Strain*E -30724; % ‘refline’ As Funciton Of ‘Strain’ D = RL - Stress; ...

7 years ago | 0

| accepted

Answered
Try it in Matlab?
Try this page: Finding the Length of a Pendulum in Motion It seems to have what you want, or at least it did when I accessed i...

7 years ago | 1

Answered
Need help finding intersection of two curves using fzero function
With symbolic variables, use the vpasolve function: syms x y1 = x^8; y2 = power(4,x); f(x) = y1-y2; intersection = vpasolv...

7 years ago | 0

| accepted

Answered
detect change of acceleration
I am not certain what you want with respect to marking acceleration changes. Try this: D = load('data.mat'); data = double...

7 years ago | 0

Answered
how to make make matlab compute values of simple trignometric identities?
If necessary, use the simplify function. Example: syms theta Eq = sin(pi + theta) Out = simplify(Eq, 'Steps',250) This ...

7 years ago | 0

Answered
Calculate mean of knee angle of five gait cycles
Two options, both using findpeaks: [pks,locs] = findpeaks(data, 'MinPeakHeight',160, 'MinPeakDistance',100); % Peaks ...

7 years ago | 0

| accepted

Answered
"Generate a 2 x 4 matrix variable mat. Verify that the number of elements is equal to the product of the number of rows and columns."
There is a function that will do exactly this. If you don’t want to use that function, reshape your matrix to a vector, then de...

7 years ago | 0

Answered
Plot 2D surface with z axis as colored bar
Use the contourf function with 'LineStyle','none'. Example — M = peaks(20); % Data For Plot ...

7 years ago | 0

Answered
I want to know, how to solve the Falkner Skan equation f´´´+ff´´+b(1-(f´)square)=0 2D plot?
syms b f(t) t Y Df = diff(f); D2f = diff(Df); D3f = diff(D2f); Eq = D3f + f*D2f + b*(1 - Df^2) == 0; [VF,Sbs] = odeToVect...

7 years ago | 0

| accepted

Answered
question about sinc function ploting
To move it in the plot, simply add the appropriate value to the ‘t’ vector: t=-40.955:0.005:40.960; u=(200/pi)*(15*sinc(15*t)...

7 years ago | 0

| accepted

Answered
Error in line 17, could not equate matrices (Assignment error) (right side 201x 201) (left side 1 by 201)
I am not certain what result you want. A simple fix for that is to create a (201x201) matrix using simple matrix-vector multi...

7 years ago | 0

Answered
Bandpassing of a signal
An equivalent elliptic filter (essentially the same one the bandpass function would design): Fs = 1000; ...

7 years ago | 0

| accepted

Answered
creating a 'for loop'
Try this: for k = 1:3 V = (1+5*(k-1)):2:5*k end Experiment to get the result you want.

7 years ago | 0

Answered
Remove the baseline wander
1)So I can't use a digital filter for processing the real time signal continuously? I’m not aware of any MATLAB ability to do ...

7 years ago | 0

| accepted

Answered
i wanted the slope with respect to time frame
First, negative values for haemoglobin or oxyhaemoglobin do not make sense physiologically. I have no idea what you want to d...

7 years ago | 1

| accepted

Load more