Answered
How to change the default style of bode/bodemag/bodeplot?
They are available, however they are extremely difficult (requiring extensive handle spelunking) to find and change. The best...

4 years ago | 0

Answered
Using interp1 to write code
It may only be possible to see the differences by subtracting them from each other or plotting them against each other.

4 years ago | 0

Answered
How do you set the x axis ticks / labels to be equal to the y axis ones?
The tick ranges are governed by the original data. If the tick ranges are different, the only options are to either set the x...

4 years ago | 0

| accepted

Answered
Uneven Pulse Time Transition Calculation.
The Signal Processing Toolbox has several functions that could do what you want, one such is the risetime function. Others ar...

4 years ago | 0

Answered
Replacing a zero value of a matrix with the value left to it
One approach using fillmissing — A = [8 1 6 3 0 7 4 9 2]; A(A==0) = NaN; B = fillmissi...

4 years ago | 1

| accepted

Answered
How to find intersection between two array line plots
It would help to have the actual data. x = 1:4; y1 = rand(size(x)); y2 = rand(size(x)); xi = linspace(min(x), max(x), nu...

4 years ago | 0

Answered
Mesh function creates extra face joining first and final data points
Try something like this — vxv = linspace(min(vx), max(vx), numel(vx)); vzv = linspace(min(vz), max(vz), numel(vz)); [X,Y]=me...

4 years ago | 0

| accepted

Answered
music piece creation with matlab
I provided an outline on how to do exactly that in my Answer to your previous question: music piece with matlab . Just change...

4 years ago | 1

Answered
Plot cummulative values without creating a cumulative vector with the values
I am not certain what you are asking. The posted plot can be created by the area function in MATLAB.

4 years ago | 1

Answered
best penalty value and mean penalty value
From the documentation: 'gaplotbestf' plots the best score value and mean score versus generation. So in every generation (or...

4 years ago | 0

Answered
How to plot more than one graph on a single tile using tiledlayout?
I cannot run the posted code, however it is definitely possible to plot more than one series on a specific tile using the hold f...

4 years ago | 0

| accepted

Answered
Estimate area from spectrogram
When I last looked, the spectrogram plot is actually a surf plot viewed from the top. All the information is available in the...

4 years ago | 0

| accepted

Answered
Legend does not recognize semilogx plot
I have no idea what the other values are that you are plotting on the bodeplot axes. Apparently, the only legend entries bodepl...

4 years ago | 0

| accepted

Answered
horizontal bar plot (from a negative to a positive value in the same line)
Try this — figure patch([-5 5 5 -5], [0.25 0.25 0.75 0.75], 'b', 'FaceAlpha',0.5, 'EdgeColor','none') axis([-5 5 0 1]) ...

4 years ago | 0

Answered
music piece with matlab
Another approach — A4 = 440; A5 = 880; Notes = A4*2^(1/12).^linspace(0, 11, 12); % Note Frequencies Fs = 8000...

4 years ago | 0

Answered
Modelling of Disease using SEIR Model with Genetic Algorithm
‘However, I got negative values for the x output, beta, which is not supposed to happen.’ The ga function does not know that....

4 years ago | 0

Answered
Zero Pad My FFT Signal and Window
I recognise my code! I see nothing wrong with that (although I do not understand the two fft calls), however I would change i...

4 years ago | 0

| accepted

Answered
Looping a regression for 30 different observations 10 times
One approach — xa = randn(300,3); ya = randn(300,1); forstep = 30; for k = 1:forstep:size(xa,1)-forstep idxrng = k:k+3...

4 years ago | 0

| accepted

Answered
How do I predict x for a given value of y using glmval?
Using code from the documentation as an example — x = [2100 2300 2500 2700 2900 3100 ... 3300 3500 3700 3900 4100 4300]'...

4 years ago | 0

| accepted

Answered
Doesn't Match legend color and plot color
There are several lines created for the first plot call. Return handles to each plot call and then choose the first line of eac...

4 years ago | 1

| accepted

Answered
How can I make exponential function visible
One option would be to create at lelast the y-axis scale as logarithmic — X = linspace(0, 1, 50); Y = exp(-10^18* X); figu...

4 years ago | 0

Answered
how i can evaluate LTI system on matlab
You will need the Control System Toolbox to evaluate it.

4 years ago | 0

Answered
Inner matrix dimensions must agree error in ga
There is only one parameter, however it has two conflicting constraints. The constraints are: Unless there is something...

4 years ago | 0

| accepted

Answered
how to obtain peak time
I am not certain what the problem is with what you want to do, however the text function could be a solution.

4 years ago | 0

| accepted

Answered
Is there a way to update the legend as the for goes on?
See the legend documentation section on Specify Legend Labels During Plotting Commands for one possible approach x0 = 10; t =...

4 years ago | 0

Answered
estimation of parameters by using lsqnonlin for system of differential equations
I recognise my code. It should have the correct lsqcurvefit call, so all you need to do is substitute your differnetial equat...

4 years ago | 1

Answered
How to test whether two arrays are statistically different?
I would plot them with surf and then look at each separately and then both together, depending on what they are (here, plotting ...

4 years ago | 1

| accepted

Answered
How do i delete red box?
You forgot one semicolon. That is the one following the function call itself: A=work5(x); Add it, and the problem should b...

4 years ago | 0

| accepted

Answered
How do I get damping constant and periods duration of my damped oscillation
The approach in Calculate time period of a graph signal is one option. That code assumes an exponential envelope, so it will be...

4 years ago | 1

Answered
Solve function:Error using sym/solve>getEqns
Looking at the documentation for qfunc it is straightforward to create a symbolic version — syms B symqfunc(x) M= 1024; sym...

4 years ago | 1

Load more