Answered
Solving a system of 2 equations and one unknown
The problem is that: f1 = vpasolve(eqn1) f2 = vpasolve(eqn2) produce: f1 = 0.8 f2 = 0.513543394140409065782200110558...

5 years ago | 0

| accepted

Answered
my cord for ordinary differential equation didn't work
Try this instead: tspan = [0: 0.05: 8]; x0 = [0.4; 0.0]; [t,x] = ode15s(@dfuncl, tspan, x0); figure plot (t, x(:, 1)); ...

5 years ago | 0

| accepted

Answered
How to calculate area under each peak in plot from sampled data
Try this: D = load('flow_inspi3.txt'); t = D(:,1); s = D(:,2); brk = find(ischange(s,'linear','Threshold',1E-8),1); ...

5 years ago | 1

| accepted

Answered
Multiple curve fitting for parameter identification: multi-objective optimization
I am not certain what you want to do. To fit different parameter sets to different parts of the data, this works: T1 = read...

5 years ago | 2

| accepted

Answered
How to remove some parts of a Matlab plot?
Try this: w = -pi:0.01:pi; r1 = 3; r2 = 4; x1 = 2.5; y1 = -2; x2 = 1; y2 = 0.5; x11 = x1+r1*cos(w); y11 = y1+r1*sin(...

5 years ago | 0

| accepted

Answered
how can I scale the subplots ?
I am not certain what result you want. One option is the axis function. Use the same limits on each subplot so that they all...

5 years ago | 0

| accepted

Answered
How to handle ECG muscle noise artifacts correctly ?
I would use a bandpass filter. Example — D = load('ecg.mat'); EKG = D.ecg; L = numel(EKG); Fs = 125; ...

5 years ago | 0

| accepted

Answered
How do you enforce Element-wise operations in function handles?
I will be roundly criticized for suggesting the vectorize function. I have no idea why it is ‘Not recommended’ since in situati...

5 years ago | 0

Answered
How to plot a polar plot with different colors or how to overlay the plots?
Try something like this: a = linspace(0, 2*pi); % Create Data r = sin(a) + cos(2*a); ...

5 years ago | 1

Answered
APPLY FFT TO NON PERIODIC SIGNAL
Use the fft function. The signal does not need to be periodic. Every signal can be decomposed into a series of sinusoids of va...

5 years ago | 0

| accepted

Answered
FFT of array of signals
Use the fft function. The documentation explains how to calculate and plot the amplitude and phase spectra. There are also s...

5 years ago | 1

| accepted

Answered
How can I change background color in Bode plots?
Try this: figure bode(tf([1],[1 1])); Fg = gcf; set(Fg.Children(2), 'Color','y') set(Fg.Children(3), 'Color','y') .

5 years ago | 1

| accepted

Answered
Plotting Problem with multiple numbers under one variable.
Index them! Since all the ‘i’ vectors are the same, a few minor corrections (and some repetitive editing) produces: iv=0:0....

5 years ago | 0

Answered
Fit of multiple data set with variable parameters
(I was in the middle of posting an Answer here when my desktop crashed. Again. I really hate Windows!) That aside, the pr...

5 years ago | 0

| accepted

Answered
Find intersection of curve and line.
Try this: syms x1 x=[0;1;2;3]; y=[7;5;11;28]; for i=1:4 for j=1:4 a(i,j)=power(x(i),(j-1)); end end b=...

5 years ago | 1

| accepted

Answered
Error in running the code for bvp4c with second order equation, how can I solve this issue?
There is a missing operator (most likely multiplication): Pe(y(2) -Theta*((y(1)*(A-y(1)))/(K*(A-y(1))+y(1))))]; ↑ ← HERE T...

5 years ago | 0

| accepted

Answered
How Can I Solve The Following integral Equation?
One approach: gamma = 4.2; % Create Parameter resultOfIntegral...

5 years ago | 1

| accepted

Answered
How to identify the baseline
Since the baseline appears to be the minimum value, the min function may do what you want. There are similar functions that can...

5 years ago | 0

| accepted

Answered
Muddy y axis and plotting using coordinates
‘I am thinking asking Matlab to plot based on coordinates, but I don't know how to use a matrix to store the coordinates, and us...

5 years ago | 0

| accepted

Answered
How do I determine which pattern is in a string?
I am not certain what result you want. Try this: MyTable.Properties.VariableNames = {{'Node Number'} {'X Location (m)'} ...

5 years ago | 1

| accepted

Answered
How to change a portion of cell array?
Guessing as to what the structure is, try this: trial{1} = {(1:10).', rand(10,1), 'Information'}; FirstColumn = trial{1}{:,1}...

5 years ago | 0

| accepted

Answered
Equation for two function curves
Try this: a = [95.80266, 46.83612]; b = [-88.53938, 40.09957]; c = [30.84839, 10.91162]; d = [-16.56475, 33.07311]; x ...

5 years ago | 1

| accepted

Answered
Creating an Concatenated Array for one word
Use the repmat function.

5 years ago | 0

Answered
plot3 not functioning
Please define what ‘not working’ means. Does it throw an error? If so, copy all the red text from the Command Window to a Comm...

5 years ago | 0

Answered
how to plot a contour plot with excel data??
I cannot see how to do a contour plot of two vectors that do not represent gridded data, since that does not make sense. Howe...

5 years ago | 0

Answered
error using plot vectors must be same length
The ‘V’ vector needs to be defined differently. One possibility is: V = linspace(0, 200, numel(G_1)); % Vehicle speed (mph)...

5 years ago | 1

| accepted

Answered
find local maxima of a signal
Use the Signal Processing Toolbox findpeaks function (introduced in R2007b) or the MATLAB islocalmax function (introduced in R20...

5 years ago | 0

Answered
Fit of multiple data sets
That is relatively straightforward. If your objective function outputs only one vector (as opposed to three), concatenate the d...

5 years ago | 0

| accepted

Answered
How can i plot this 3D function?
Change ‘PhA’ to: PhA=linspace(0,pi,numel(VA)); then, once the ‘PA’ calculation is fully vectorised (so that it uses element-w...

5 years ago | 1

| accepted

Answered
Function findchangept doesn't work when option 'MaxNumChanges' in added
I am not certain the results will be better, however the ischange function (introduced in R2017b) is an alternative.

5 years ago | 0

Load more