Answered
Plotting help with a simple problem
Subscript all of them. Try this: a=750000; %staring amount b=35000; %starting withdrawl y=0; %years while a>b ...

6 years ago | 1

| accepted

Answered
Finding lowest value and the index from vector excluding zero and inf
Try this: x = [1 3 2;-1 inf 0.5]; [r,index] = min(x(x>0)) producing: r = 0.5 index = 5...

6 years ago | 0

| accepted

Answered
Way to visualise system of ODEs
Try your code with these changes: [V1,Sbs] = odeToVectorField(ODE1,ODE2); F1 = matlabFunction(V1,'vars',{'t','Y'}); ...

6 years ago | 0

| accepted

Answered
How to have 2D bar on side of 3D plot?
See if subplot or tiledlayout (introduced in R2019b) will do what you want. That is likely the closest it’s possible to get.

6 years ago | 0

Answered
Fit data to a sinusoidal curve
One option is to see if the approach in Curve fitting to a sinusoidal function does what you want.

6 years ago | 0

Answered
Offset removal from a sinusoidal wave
Try this: D1 = readmatrix('Output.csv'); x = 1:numel(D1); D1HL = min(D1(D1>0)); D1HI = (D1>D1HL); ...

6 years ago | 1

| accepted

Answered
Help with the integral function
It appears that what you want to integrate could be vectors, not functions. If so, use the trapz (or cumtrapz) function to do a...

6 years ago | 0

Answered
HOW TO NORMALIZE MATRIX BASED ON COLUMNS' MAX VALUE?
Try this: N = normalize(T,'norm',Inf,'DataVariables',{'Height', 'Age'}) Put multiple variables in a cell array (note the curl...

6 years ago | 0

Answered
Solving an overdetermined set of simultaneous equations
There is no symbolic solution. If you want to experiment with it, one option is: syms e0 e1 e2 T1 T2 T3 T4 T5 TM1 TM2 TM3 T...

6 years ago | 1

Answered
Numerical integration using cumtrapz
The cumtrapz function integrates a vector, and ideally, the dependent variable vector with respect to the independent variable v...

6 years ago | 0

| accepted

Answered
How do i get my answer to print into a table format instead of a single line
Your code is close. Use tab characters ('\t') and carriage return-newline ('\n') characters as appropriate: fprintf(fid,'\t\t...

6 years ago | 0

| accepted

Answered
Fill area between two curves
Try something like this: t = linspace(0, 2*pi); x = ([1;2]*cos(t)).'; ...

6 years ago | 1

| accepted

Answered
Low pass filter using filter coefficient
If you have the Signal Processing Toolbox, first check the filter stability and performance with the freqz function. Then use...

6 years ago | 0

| accepted

Answered
How could I calculate and get multiple pulses area under curve value?
See if my Answer in Find quasi-periodic peak locations from noisy photon count data will do what you want. (It seems to be a si...

6 years ago | 0

| accepted

Answered
Find peaks from noisy data
I gave up on estimating the width parameter, and just went for the amplitude and location with a uniform width. Try this: D...

6 years ago | 0

| accepted

Answered
Finding a column with specific text
I have no clear idea of what the exact problem is, however using strfind or strcmp (or strcmpi) instead of the logical operation...

6 years ago | 0

| accepted

Answered
Sym equation to double
There are 2 values for ‘y’, so use solve rather than isolate to calculate them: syms y theta=60; r=y/sind(theta); x=r*cosd(...

6 years ago | 1

| accepted

Answered
Identifying the linear part of a curve
The problem is that the data are noisy, so they need to be made less so. Also, the smoothing and ischange functions need to u...

6 years ago | 0

Answered
Error using fdesign.notch
The fdesign.notch function is in the DSP System Toolbox. An appropriate Signal Processing Toolbox equivalent function is band...

6 years ago | 1

| accepted

Answered
How to vectorize the following code snippet ?
That can all be reduced to: out = zeros(size(M))-1; out(M>0) = 1; out(M==0) = 0; producing the same result.

6 years ago | 0

| accepted

Answered
if statement "not enough input arguments." error
I have no idea what you intend, however the add function is likely not appropriate here. Consider simply concatenating instead....

6 years ago | 0

Answered
Error while executing the simulation?
See my Answer to your duplicate Question how to simulate using lsim command I am receiving error because of variable 't'(time). ...

6 years ago | 0

| accepted

Answered
Check for missing argument or incorrect argument data type in call to function 'int'.
It does not want to use the Symbolic Math Toolbox. It wants to use the correct integration function. Try this: function g ...

6 years ago | 0

| accepted

Answered
How can I draw infinite concentric ellipses with centre (0,0) at an interval of 0.001 upto half axis lengths of 5
Experiment with this to get the result you want: elps = @(r,rr) [r*cos(linspace(0,2*pi)); r*rr*sin(linspace(0,2*pi))]; % Ell...

6 years ago | 0

| accepted

Answered
how do I trun my math equation into math lab code ?
It would appear that you just did exactly that: t= (x1-X2)/ sqrt[(s1)^2/N1 +(S2)^2/N2]; The only thing you need to do is to ...

6 years ago | 0

Answered
Moving Average Filter and Exponential Filter
See Moving-Average Filter in the filter function documentation. The exponential filter is a version of this same approach.

6 years ago | 0

Answered
phase difference of oscillators
It depends on whether the phase relationship is constant or changes, and what the data are. If it is constant, calculating them...

6 years ago | 0

| accepted

Answered
How do I change the Contourf scale
The contour functions all allow the ability to define the number of contours as well as specific levels. In the contourf docume...

6 years ago | 1

Answered
Error in fprint command
The comma characters may not be permitted in the operating system you are using. Replacing them with underscores ('_') may be...

6 years ago | 0

| accepted

Answered
how to simulate using lsim command I am receiving error because of variable 't'(time).
The input ‘u’ must have the same number of columns as ‘B’. I have no idea what you actually want to do (or what your ‘u’ is),...

6 years ago | 0

| accepted

Load more