Answered
Testing a created function
First, it is best not to use ‘ans’ as a variable, since it is the default variable and can be overwritten. Second, the the if...

3 days ago | 0

| accepted

Answered
Solve a system of linear equations in matrix form
The problem is that the system is sparse, so you need to use sparse functions with it. Try this: Left = [1 -1 0 0 0; 1 0 0 ...

3 days ago | 0

| accepted

Answered
Error plotting bode diagram of a transfer function inside a matrix
That is not the error. The error is that you are using the Symbolic Math Toolbox when you need to be using the Control System...

4 days ago | 0

| accepted

Answered
how to plot 2D Vector field of a 3D ode
The easiest way is to just change the view direction: figure q=quiver3(x1,y1,z1,u,v,w ,2); figure(gcf); view(0, 90) Make ap...

4 days ago | 1

Answered
Plot doesn't show anything
Try this slight edit of your code: orbit=zeros(1,300); j=0; % parameter range rv=2.8:0.001:4; for k = 1:numel(rv) r =...

4 days ago | 0

| accepted

Answered
Scatter plot legend marker size is huge
The only possibility I can suggest is to use Yair Altman’s export_fig to export them to PDF.

4 days ago | 0

Answered
3D plotting base surface
I am not certain what you are asking. The plot appears to be by the stem3 function. Try this: x = randn(1, 10); y = ran...

4 days ago | 0

Answered
Solve Integral Equation with function handles
Every multiplication in ‘Fermi’ needs to be vectorised (with element-wise operations), the Symbolic Math Toolbox is not necessar...

4 days ago | 1

| accepted

Answered
Graphs of mean and standard deviation
There are several ways, depending on what you want to do. See the errorbar function for one option.

4 days ago | 0

Answered
scatter with custom color of point
I am not certain what you want. Try this: x = rand(1, 20); y = rand(1, 20); c = y >= 0.5; ...

4 days ago | 0

Answered
Fitting Data to a Non-Linear Curve
One possibility: x=[0 1 2 3 4 5 6 7 8 9 10]; y=[.0242 0.1940 0.2792 0.2358 0.1386 0.0598 0.0238 0.0090 0.0034 0.0013 0.002]; ...

5 days ago | 0

| accepted

Answered
mono font not show up in matlab’s fonts
See: How can I add a new font to the list of available fonts in MATLAB?q - MATLAB Answers - MATLAB Central

5 days ago | 0

Answered
How to use a timer most efficently for finding pings/second
One option for recording the times would be to use the clock function. Then use the etime function to recover the elapsed times...

5 days ago | 0

| accepted

Answered
Subplots squished to top of page, manually setting position not working
The code tells subplot to plot 12 rows and 3 columns. Try this instead: ax(ii) = subplot(nplts/3, 3, ii); The result is mu...

5 days ago | 0

| accepted

Answered
Filing/interpolation of irregular sample time series multivariate data
Try this: T1 = readtable('Edward Bam Eddata.txt'); T2 = table2timetable(T1, 'RowTimes','TimeStamp'); T3 = retime(T2, 'daily'...

5 days ago | 0

| accepted

Answered
Need to plot the determinant of the matrix for t 0 to 1?
Try this: PHI = @(t) [ 1, t, t/3-(2*exp(-3*t))/9+2/9, (2*t)/3+(2*exp(-3*t))/9-2/9; 0, 1, (5*exp(-3*t))/12-(3*exp(t))/4+1/...

5 days ago | 0

| accepted

Answered
MatLab Confidence interval range
Use the tinv function to calculate the critical values for normally-distributed data with varying sample sizes. (This is in the...

5 days ago | 0

Answered
How can I insert the value of a symbol in symbolic matrix and convert it into a numerical matrix?
Please see Plotting error: Need to plot the evolution of symbolic matrix? to convert it to a numerical matrix (as an anonymous ...

5 days ago | 0

Answered
for loop not working
We o not have your entire code. Note that the transpose call is not necessary, since the mean funciton also accepts a dimension...

5 days ago | 0

| accepted

Answered
Plotting error: Need to plot the evolution of symbolic matrix?
Try this: PHI = @(t) [ 1, t, t/3-(2*exp(-3*t))/9+2/9, (2*t)/3+(2*exp(-3*t))/9-2/9; 0, 1, (5*exp(-3*t))/12-(3*exp(t))/4+1/...

5 days ago | 0

| accepted

Answered
surface fixed point value Z
I do not have the function you used to create the surface in your Question. Try this with it: [X,Y] = ndgrid(-2.5:0.1:2.5);...

6 days ago | 0

| accepted

Answered
X Y grids on 2D surface plot
If you want to see the grid lines, do not use shading interp Just do: [X,Y,Z] = peaks(25); figure surf(X, Y, Z) grid on ...

6 days ago | 0

| accepted

Answered
Finding index of closest value in an array of different dimension
I am not certain that I understand what you want to do. If you want to use the discrete timestamps, the ismembertol function ...

6 days ago | 0

Answered
Fit Powerlaw to Data
Try this: STRESS = [0.574, 367.364, 449.112, 531.087, 596.241, 649.097, 695.038, 737.173, 815.008]; S...

6 days ago | 0

| accepted

Answered
hwo to find inverse of marcum fuction
Try this: Q = marcumq(5, 10); % Create Output B0 = rand; ...

6 days ago | 0

Answered
I want to show the Magnitude response of three filters, as one response
It’s always worth experimenting. It seems that convolving the numerators and denominators of the individual filters is approp...

6 days ago | 2

Answered
Variable plot title and legend
The easiest way is to use the sprintf function inside the title and legend, respectively. It also allows straightforward inclus...

6 days ago | 0

Answered
Matlab considers different two equal numbers!
You are not seeing the entire picture. If you test ‘matrix(11,:)’: Check = matrix(11, :) - max(matrix(11,:)) the result is...

7 days ago | 1

Answered
Plot call does not do its work properly.
The plot call you posted has it only plotting the second output of ‘spring_mass_system’. It doesn’t show three lines because ...

7 days ago | 0

| accepted

Answered
Finding a value and marking it in a graph
The only way I can see to calculate ‘M’ where ‘epss’ is equal to 0.009 is to duplicate the first nested loop, defining: epss =...

7 days ago | 0

| accepted

Load more