Answered
How to find Phase angle?
I am not certain that is possible for this system. since the roots are all real. See if getting the ‘Gains’ and ‘Roots’ will ...

4 years ago | 2

Answered
Unable to read completely a text file
Try something like this instead — data = textscan(fileID, '%d %f %d %d %d;') The format string should then read it correctly....

4 years ago | 0

| accepted

Answered
How to plot Fourier transform against frequency?
I am not certain what you want to do. Try this — n = 400; %number of points F1 = 3; %frequency 2 F2 = 2; %frequen...

4 years ago | 1

| accepted

Answered
I cannot change the datetime x axis locale setting in the plot function.
In the datetime documentation under Input Arguments see 'Locale' (there is no direct llink to it). Defining: MyDatetimeArra...

4 years ago | 1

| accepted

Answered
How to remove noise from the signal analyzed by fft
Probably the easiest way to deal with a noisy signal (considering that the nature of the noise is not stated here) is to use the...

4 years ago | 0

| accepted

Answered
Attenuation as a Function of Frequency
I am not exactly certain what you are diong, however the procedure described, ‘In the frequency domain I divide the back wall of...

4 years ago | 0

| accepted

Answered
Use System Identification Toolbox Model with input parameters
From the polyest documentation: [sys,ic] = polyest(___) returns the estimated initial conditions as an initialCondition objec...

4 years ago | 0

| accepted

Answered
How to check whether datetime is within range
There are several ways to do this, all using logical indexing. The easiest way is with the isbetween function. C = strsplit(...

4 years ago | 0

| accepted

Answered
How can I find the number of major peaks in an energy spectrum
Use the findpeaks function, and set 'MinPeakProminence' to the value that gives the desired result.

4 years ago | 0

| accepted

Answered
Function to return Interpolated Value at one query point
Use the griddedInterpolant function, and then experiment with the actual data to see what gives the best results — xA = (rand(...

4 years ago | 0

| accepted

Answered
colorbar for line plot number
The colorbar apparently does not want to do this by itself, since it appears to scale to the ‘z’ values in a 3D plot (or equival...

4 years ago | 0

| accepted

Answered
Plotting powers of 10 on the colorbar
These are 'Ruler' properties, and they are not in the colorbar documentation. (I had to go searching for them, and then experim...

4 years ago | 1

| accepted

Answered
How do I get MLE(Maximum Likelihood Estimation)?
See the documentation on the mle function. LD = load('1민제 강 data.mat'); data = LD.data; [phat,pci] = mle(data) figure h...

4 years ago | 1

| accepted

Answered
Getting empty solution for second order differential equation
It apparently does not have an analytic solution. Integrate it numerically — syms x(t) t Y ode = diff(x,2) + 2*diff(x) + ...

4 years ago | 1

| accepted

Answered
How to define second derivative in symbolic
Use the symbolic diff function — syms A r(A) = cos(A) D1r = diff(r) D2r = diff(r,2) .

4 years ago | 0

| accepted

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

Load more