Answered
Error using odearguments - error in ode45
just before the end call, add: diffeqs = diffeqs(:); That should at least solve the ‘column vector’ error, since ‘diffeqs’ is...

6 years ago | 0

| accepted

Answered
double integral problem pleas help
The integral2 function is not appropriate for symbolic arguments. Try this version of the loop instead: m=zeros(8,8) ; k=1...

6 years ago | 0

Answered
Use scatter3d to plot large dataset with 7 colors
It may be necessary to describe the problem in greater detail. The scatter3 documentation implies that it would be appropriate ...

6 years ago | 1

| accepted

Answered
pplane update for Matlab 2020b?
The R2020b release is likely a few weeks off. Otherwise, one option is: dfield and pplane (Java versions) and others are avai...

6 years ago | 1

Answered
Change numerical data points to dates
Neither MATLAB nor I understand ‘0120’ in what otherwise appears to be the year field in the date vector. Try this: datstr ...

6 years ago | 0

Answered
Nonlinear least-squares data fit
The objective function needs to be coded as: ffcn = @(c) f(c,x) - y; with the complete lsqnonlin call being: f=@(c,x) c(1)...

6 years ago | 1

| accepted

Answered
Problem with FFT amplitude plot
To see the frequency peaks, it is necessary first to remove the D-C offset by subtyracting the mean of the signal: D1 = readma...

6 years ago | 1

Answered
parameter estimation with lsqcurvefit and boundary value ode (BVP4c)
The lsqcurvefit function needs to have the output of the objective function the same size (with respect to row and column dimens...

6 years ago | 1

| accepted

Answered
Reading Text Files with Numbers and String
Try this: fidi = fopen('data1.txt'); A = textscan(fidi, 'ID#: %f time: %f A: %f B: %f C %f', 'Delimiter',{'\t',';'}, 'Multipl...

6 years ago | 1

| accepted

Answered
Removing first half signal
If ‘signal’ is the signal vector and ‘t’ is the time vector: new_t = t(ceil(numel(signal)/2):end); new_signal = signal(ceil(n...

6 years ago | 1

| accepted

Answered
Surface plot by using three vectors of the same length
The surf plot only requires that ‘Z’ is a matrix. The ‘X’ and ‘Y’ arguments are good to have, although not necessary (and they ...

6 years ago | 1

| accepted

Answered
Logarithmic scale with a different base
Try this: N = 1:10000; M = 61; L = N-M+1; ova_complex = ((N.*(log2(N)+1))./(N-M+1)); figure stem(log2(N),ova_complex) x...

6 years ago | 0

Answered
Frequency response of a parallel IIR filter
If they were in series, the transfer functions would be multiplied, and in parallel, added, according to Series and Parallel Tra...

6 years ago | 1

| accepted

Answered
Text position based on another Text
I am not certain what the problem is. Try something like this: x = 1:20; y = 10*sin(pi*x/5); figure plot(x, y) grid ...

6 years ago | 0

| accepted

Answered
Select rows based on a string in a cell
Use strcmpi (the case-insensitive version of the function) instead.

6 years ago | 1

| accepted

Answered
Operands to the || and && operators must be convertible to logical scalar values.
EDIT — (12 Aug 2020 at 20:30) I suspect that ‘locs’ is a column vector, and that is causing the problems both with the loop (be...

6 years ago | 0

Answered
how to compute the complex Fourier series expansion of half-wave rectified signal. and plot its phase and amplitude spectrum?
My impression is that this is homework. We give hints for homework, not complete code. (You must write the code. We will help...

6 years ago | 1

Answered
Spectral Entropy vs Frequency
Plotting spectral entropy as a function of frequency is actually described in the documentation in: Plot Spectral Entropy of Spe...

6 years ago | 1

Answered
x-intersection of part of extended line from curve
Add these lines to your code after the ‘m’ calculation and before figure(1): B = [TC ones(size(TC))] \ IC; ...

6 years ago | 0

| accepted

Answered
i kind want to pull the blue curve forward in time to match the red curve , so that the peaks match in time. that is the marker curve should be moved 20 seconds forward.
Just add (or subtract) 20 seconds from the blue curve time value, then plot them together. A simple example: xr = 1:20; yr...

6 years ago | 0

Answered
Find slope signal change
The ischange function (introduced in R2017b) is helpful here.

6 years ago | 1

Answered
How to plot confident interval of ecdf() as shade?
Try this: a = rand(30,1); [f1,x1,up,low] = ecdf(a); idx = ~isnan(up) & ~isnan(low); figure plot(x1(idx), f1(idx), '-r') ...

6 years ago | 1

| accepted

Answered
PROBLEM USING PLOT AND SUBPLOT WITH HANDLE FUNCTION
Since ‘q’ is a function, it must be evaluated as a function. Try this: P=@(N) (L*V)./q(N); then: subplot(2,3,1) plot(P(...

6 years ago | 0

Answered
atan2(0,0) is not undefined (NaN)
That is defined in the IEEE Compliance section of the atan2 documentation. The result also isd not completely standardised. ...

6 years ago | 1

| accepted

Answered
How to plot duration where time rolls over days?
You will need to convert these to your duration array, however the day-of-year conversion (using DDD in the InputFormat string) ...

6 years ago | 0

Answered
How to loop time ( hours and minutes ) in a data set
The retime function (and the timetable creation that is necessary to use it) is likely the best option.

6 years ago | 0

Answered
How To Create A Persistence Plot
Perhaps something like this: x = linspace(0, 10, 250); %...

6 years ago | 2

| accepted

Answered
plotting error bars in both x and y data
I am not certain what the problem is. See: Control Error Bars Lengths in All Directions .

6 years ago | 0

| accepted

Answered
Calculate the date difference
The vectors must have the same sizes. Use between: DaysDiff = between(StartDate(1:numel(EndDate)),EndDate) to get: DaysD...

6 years ago | 1

| accepted

Answered
How to use ezplot
The ezsurf (and fsurf) functions accept only single-variable functions. Try this: figure ezcontour(@(x,y) x^2 - 9*y^2 - 81...

6 years ago | 0

Load more