Answered
How to automatically chop up signal??
It depends on where you define ‘start’ and ‘end’. If you want to consider the middle of the signal rather tha either peak, fi...

5 years ago | 0

| accepted

Answered
How do I plot only the lower error bars?
Try this: errorbar(x_new,y_new,residual,[]) It specifies that the lower error bar is to be plotted and the upper error baar i...

5 years ago | 0

Answered
Genetic algorithm fot multi differential equations
The ‘fitness_fun’ function should probably be something like this: function y = fitness_fun(x,t,N) tspan = t; y0 = [...

5 years ago | 0

| accepted

Answered
Help with Lotka-Volterra error codes
Function definitions of the type you posted can be at the end of a script in recent MATLAB releases, and are not required to be ...

5 years ago | 0

| accepted

Answered
Integrated Mean Square Error of an Error Signal
The mean square value of any vector ‘v’ is: MS = mean(v.^2); Thje root-mean-square is just the square root of that: RMS = s...

5 years ago | 0

Answered
Chirp (Swept-frequency cosine) Signal Generation
Change the first plot call to: plot (t,y, t(end)+t,fliplr(y)); If I understand correctly, that should do what you want.

5 years ago | 1

| accepted

Answered
ECG Signal Pre-processing for noise removal.
See my most recent Comment to your earlier Question.

5 years ago | 0

| accepted

Answered
Confidence intervals for fitting parameters in a system of ODEs?
The approach in Parameter Estimation for a System of Differential Equations uses the lsqcurvefit function, and that will work wi...

5 years ago | 1

| accepted

Answered
Why isn't this value being saved using ismember and round?
Since decimal fractions are never exact (even using round), use ismembertol (introduced in R2015a) for the comparisons. It will...

5 years ago | 1

| accepted

Answered
Using fprintf to display an existing table
I would do something like this: T = array2table(rand(5)); T.Properties.VariableNames = {'ratio' 'phi (deg)' 'theta_p (deg)' '...

5 years ago | 0

Answered
how to write if Loop (or while loop) in this kind of problem
I gave one example in a Comment to your earlier Question.

5 years ago | 0

| accepted

Answered
not enough input arguments Error
Call it as: out = custmf1(x,params); with the arguments stated and in the calling script workspace. Only anonymous functions...

5 years ago | 0

| accepted

Answered
What error is this??
The expm function can accept symbolic arguments, however expm1 cannot.

5 years ago | 0

Answered
Create a line graph for categorical data array?
See the documentation section on XTickLabel and YTickLabel depending on the one you want to change.

5 years ago | 0

| accepted

Answered
comparision data in matlab
I am not certain of the result you want. Try this: File1 = [4.0004000e+02 2.2576667e+03 4.0006000e+02 2.7194...

5 years ago | 0

| accepted

Answered
How can i calculate area under curve from CSV file.
It would help to see the .csv file. Apparently, ‘t’ was converted to a duration array in the process of reading it. Try th...

5 years ago | 2

| accepted

Answered
Finding the elements within a certain range [XMin, XMax] in every column of an array, then converting all the elements of each column within that range to the minimum of that range
‘find the minimum in every column of an array, then convert all the elements of each corresponding column that have a value belo...

5 years ago | 0

| accepted

Answered
Matlab-Plotting a probability matrix
Try this: D = readmatrix('New_MP_CS.csv'); x = D(2:end,1); % Original ‘x’ Vector y =...

5 years ago | 0

| accepted

Answered
Linspace and polar coordinates
I’m not certain where you’re going with your code or what you want to do with it. Try something like this: x=[-2 -1 0 1 2];...

5 years ago | 0

| accepted

Answered
How to store answers from a for loop into a vector?
Depending on what size you want ‘m’ to be, one option is to asssign it in the loop as: m(x-119) = result_of_calculation; Note...

5 years ago | 0

Answered
How can I use a for loop to get the function to run at multiple values?
I am not certain what result you want. Try this: fxn = @(n,x) sqrt(2/4.0).*sin(((n.*pi).*(x-0.6))./4.0); n = (1:4).'; x...

5 years ago | 0

Answered
How to read specific columns of a Txt file and store them in an array?
Try this: T1 = readtable('Data.txt','HeaderLines',1); T1.Properties.VariableNames = {'t', 'vd', 'zd', 'mdro'}; T1.mdro = T1....

5 years ago | 1

| accepted

Answered
'Too many input arguments' error when using imag()
Enclose the arguments in square brackets to create a vector from them: Elevationcm = imag([ElevPointx,ElevPointy]); That will...

5 years ago | 0

Answered
How to repeat a pattern on xticks?
Try this: x = 0:24; y = rand(size(x)); figure plot(x, y) set(gca, 'XTick',x, 'XTickLabel',{'A','B','C','D','E'}, 'XTickL...

5 years ago | 1

| accepted

Answered
How to call specific number from polyfit
Try this: T = [0 8 16 24 32 40]; Oxy = [14.621 11.843 9.870 8.418 7.305 6.413]; p = polyfit(T,Oxy, 5); pv27 = polyval(p,27)...

5 years ago | 0

| accepted

Answered
Add variable legend to a plot without for loop
This appears to work correctly: x = 0:0.1:10; y = exp(-(x-(0:4).').^2)./(1:5).'; figure plot(x, y) lgd = {'HGS 50-year',...

5 years ago | 1

| accepted

Answered
Not enough Input Arguments ode45
Change the ode45 call to: [t,x]=ode45(@(t,x)NI(t,x,sigma),Time,x0,sigma); so the complete code is now: function [dx] = NI(t...

5 years ago | 0

| accepted

Answered
Plotting using fitnlm- custom function
I added a scaling term and an offset term: modelfun = @(k,x)k(1).*exp(-k(2).*x)+k(3); beta0 = 10; mdl = fitnlm(xdata,ydata,m...

5 years ago | 0

Answered
Find beginning and end points from a pulse
Either first negate the pulse (multiply it by -1) and then use findpeaks, or use islocalmin (possibly with find) to determine th...

5 years ago | 0

| accepted

Answered
Amplitude increase after filter
If you want the filter (in this instance what appears to be a moving-average filter) not to amplify the signal, the denominator ...

5 years ago | 0

| accepted

Load more