Answered
Semilog x axis for Scatter Plot
The plot is working correctly. To more easily see that it is, add this xlim call (temporarily): xlim([0.01 10]*1E+5) .

6 years ago | 0

| accepted

Answered
plotting with variable parameter
Try this: f = @(b,x) x.^3+b.*x.^2+1; bv = -3:0.5:3; % Define ‘b’ x = linspace(-1, 1...

6 years ago | 0

| accepted

Answered
Why doesn't diff() recognise the second variable?
This works correctly in R2020a (Update 3): syms x(t) xr = x diff(xr) % why doesn't it recognise that xr is a function of tim...

6 years ago | 1

| accepted

Answered
Why is there a difference between "compare" function and "lsim" function ?
Reading the documentation of compare and lsim, the only significant difference is that compare automatically estimates the initi...

6 years ago | 3

| accepted

Answered
FFT from time domain in excel
There is not much to see in the plot: D1 = readmatrix('PlatformHeave.xlsx'); t = D1(:,1); ...

6 years ago | 0

| accepted

Answered
Why Matlab doesn't recognize the time variable from .xlsx file
I have no idea why datetime cannot import the time correctly in that format. The readtable function imports it a fractions of a...

6 years ago | 0

| accepted

Answered
specifying the axes limits separately for 2 sets of data on the same plot
It is necessary to set them individually with respect to each y-axis: sqrtinvT7 = 1:10; % Create...

6 years ago | 0

| accepted

Answered
Convert string cell array to string literal
There are two functions that will do that and the reverse: fullfile and fileparts.

6 years ago | 0

Answered
How can I do/implement Low pass filter function in matlab?
This is already available in the lowpass function (introduced in R2018a). Otherwise, it is straightforward to define filters ...

6 years ago | 0

Answered
fft doesnt work for me
Try this: xls = xlsread('signals.xls'); t = [0; xls(2:end,1)]*1E-6; % Time Vector (Set Initia...

6 years ago | 0

| accepted

Answered
Calculating velocity from existing data
Try this: M = [ 0 0 0.25 4 4 0.25 9 9 ...

6 years ago | 1

Answered
finding maximum value of a two plots
Try this: syms x y=(3/800)*((x).^2-(0.5)*((x).^4)); yv1 = fplot(y,[0 1]); hold on y1=(0.01/pi)*(((pi/2)*x*sin((pi/2)*x)+c...

6 years ago | 0

Answered
Solving system of second order differential equations
Your system has two differential equations, so it only requires two initial conditions. This runs without error (R2020a): c...

6 years ago | 0

| accepted

Answered
how to make the edge of the graph bold ?
Unfortunately, nothing is shown. Guessing what you may want, try this: x = 1:10; y = rand(size(x)); figure plot(x, y) ...

6 years ago | 1

| accepted

Answered
drawing surfaces despite constraints
Experiment with the sphere function.

6 years ago | 0

Answered
How to multiply with carrier ?
I do not have ‘Signal’ so I cannot run your code. You need to do element-wise multiplication with the (.*) operator, not the ...

6 years ago | 0

| accepted

Answered
How to remove this error?
I cannot determine what line threw that error because I cannot run your code. Note that: clear slidePtr obviously clears i...

6 years ago | 0

Answered
Drawing circles on a x axis
Probably the easiest way: D = load('NodalList.mat'); GlobalMesh = D.GlobalMesh; figure plot(GlobalMesh, zeros(size(Global...

6 years ago | 0

| accepted

Answered
Why is my MATLAB's bode plot wildly off?
This is a MIMO (5x2) system. Be careful that you plot the same input-outpair in MATLAB as Mathematica. The Mathematica plot ...

6 years ago | 0

| accepted

Answered
FillValue property for READTABLE
It’s mentioned seven times in various contexts. Probably the best documentation for FillValue is in setvaropts, and specificall...

6 years ago | 1

| accepted

Answered
How to design a filter that removes multiple types of noise?
It would be more helpful to have your code rather than the result of your filtering efforts (that I did not download). My app...

6 years ago | 0

| accepted

Answered
How could I do simutanoues parameter fitting for two series experimental data and multiple datasets?
See: Parameter Estimation for a System of Differential Equations for guidance.

6 years ago | 0

| accepted

Answered
I don't know how to plot this function
Use the fplot function instead: syms T(x) k q a l x k=60.5; q=1000; a=373; l=0.5; DT=diff(T); D2T=diff(T,2); T(x)= dsol...

6 years ago | 0

| accepted

Answered
50-Hz filter results in noise rather than removing it
The filter is eliminating the noise correctly. Since the aberrations decrease with distance from the large-amplitude ‘spike’,...

6 years ago | 0

| accepted

Answered
Empty sym: 0-by-1
Your error was in not leaving it in the original matrix form. This works, however I am confused by your notation, so this may...

6 years ago | 1

| accepted

Answered
How could I define a time varying parameter when using ODE45?
I have no idea what the ‘derivatives’ function is or how you call it, since you did not post the complete code. First, using ...

6 years ago | 0

| accepted

Answered
I having trouble displaying each value next to the correct data point on stem plot.
You can avoid the loop by using compose (or the undocumented sprintfc). PC = {0, NaN, -34.30, -39.90, -46.20, -47.80, -55.20,...

6 years ago | 2

| accepted

Answered
How to plot magnitude and phase spectrum of the function
Try this: z = tf('z'); X = z / (z-1)^2; bode(X) .

6 years ago | 0

| accepted

Answered
I need to solve this system
I managed to get it to run, however, ‘q’ and ‘v’ are nowhere defined, and need to be. The corrected code: syms x1(t) x2(t) ...

6 years ago | 1

| accepted

Answered
Regression of points with desired equation
Try this: Xp=[4.5 5 5.5 6 ]; Yp=[0.7 0.9 0.85 1] ; Val2 = 0.5; Y = @(X,a,b,c,Val2) 2*(1 + tanh( ( X + a * Val2 - b ...

6 years ago | 0

| accepted

Load more