Answered
Closing out points in Matlab
It is not closing on its own because it needs help to close the curve. Try this: line([x x(1)],[y y(1)]) *_NOTE_ —...

9 years ago | 0

| accepted

Answered
I get Subscript indices must either be real positive integers or logicals.
The code you posted runs without error for me (in *|R2017b|*). If it is throwing an error, please copy the *complete* erro...

9 years ago | 0

| accepted

Answered
Plot exponential graph of the given equation
t = linspace(0, 10); P = 60./(5+7*exp(-t)); figure(1) plot(t, P) grid

9 years ago | 0

| accepted

Answered
Statistical Significance using ttest2
The paired _t_-test says nothing about correlation. (The *|'unequal'|* flag is about the variances.) Consider: t = l...

9 years ago | 4

| accepted

Answered
Add p=3sinx^2+2cosy^3and q=3cosxy+2y^2
I’m not sure what you want. This works: x = linspace(0, 5, 150); y = 0.05*x + 2.01; p = 3*sin(x).^2+2*cos(y).^3...

9 years ago | 0

| accepted

Answered
How do I plot individual points on an existing graph
Only three have definable peaks. That said, this works: %Define Values d = [ 0.25, 0.5 , 1 , 1.5 , 2 ]; m = 1; ...

9 years ago | 0

| accepted

Answered
How to plot mean and standard deviation of individual waveforms?
If you want to calculate the mean at each point in *|‘t’|*, take the mean along the _columns_ of *|‘WAVE’|* and *|‘data’|*: ...

9 years ago | 0

Answered
Plotting 2D Sensor data with the same value on X-axis
I am not certain what you want. Try this: C = { 'A' 'B' 'C'}; V = [-78 -77 -91 -77 -77 -90 -75 -77...

9 years ago | 0

| accepted

Answered
How to fix: Undefined operator '*' for input arguments of type 'matlab.graphics.chart.primitive.Surface'.
Your posted code runs without error (after I supply the _scalar_ constants, and a _scalar_ value for *|‘c’|*). I don’t see ...

9 years ago | 0

| accepted

Answered
Not sure what I'm doing wrong.
I would use a loop through the values of *|‘d’|*, then plot: %Define Values d = [ 0.25, 0.5 , 1 , 1.5 , 2 ]; m = 1; ...

9 years ago | 0

| accepted

Answered
how to get this graph to plot correctly?
This works for me: f=@(x)x.^8 - 5*x.^4 + exp(x) - 7; x = [-5:0.1:5]; plot(x, f(x)) It is essentially your...

9 years ago | 0

| accepted

Answered
Increasing Line Thickness Using fplot
You need to use the handle to the *|line|* object to set the width: This works: f = @(x) (exp(-x) - exp(-16*x)); ...

9 years ago | 0

Answered
Is it posible to create a Probability Paper ??
See the documentation for the Statistics and Machine Learning <https://www.mathworks.com/help/stats/probplot.html *|probplot|*> ...

9 years ago | 0

Answered
can MATLAB work well with amd radeon 530 as graghic card?
There are no specific graphics card recommendations in <https://www.mathworks.com/support/sysreq.html?s_tid=answers_rc2-3_p6_MLT...

9 years ago | 0

| accepted

Answered
system of equations with complex variables
This seems to work: av = [(2-2i) -(2-3i); (-2+3i) (5-3i)]\[6.928+4i; 1.414+1.414i]; Check = [(2-2i) -(2-3i); (-2+3i) (5...

9 years ago | 0

Answered
Dividing fourier transform by factor n
*_‘Should n just be the length of signal?’_* *Yes.* (Note that it is the length of the _original_ signal, not of a signal ...

9 years ago | 0

| accepted

Answered
How to assign output array to array using indexes
I _believe_ I understand what you want to do. Try this: A = [18 4 5 8 1]; [As,Ix] = sort(A); Fcn_Output = [7 8 ...

9 years ago | 1

Answered
Solving a System of ODEs
You did most of it already. You simply need to combine the ODEs into a function to provide to one of the ODE solvers. *_Th...

9 years ago | 0

Answered
creating for loop in fzero
Try this: f = @(x,kappa) (1/pi)*((0.1*x)-(((sqrt((1+x)./2)).*exp(-(6*(sqrt(2*0.1*(1+x))))))).*(kappa*(sqrt((1-x)./(1+x)))-...

9 years ago | 1

| accepted

Answered
how to make symbolic answer better looking ?
First, see if the *|simplify|* command helps. To get the numerator and denominator, use the *|numden|* function. To ge...

9 years ago | 0

Answered
how to plot a perfect cartesian plane
_Guessing_ here. See if using *|axis equal|* after you create the plot does what you want. You can set the axis limits separat...

9 years ago | 2

| accepted

Answered
Reading Text file in matlab
I would use the <https://www.mathworks.com/help/matlab/ref/textscan.html *|textscan|*> (link) function to read them.

9 years ago | 0

Answered
Matlab isoutlier with NaN
Experiment with this: arraywNan = [ NaN NaN 16 2000 2400 3214 2955; 5211 3265 4328 NaN 3951 NaN 18]; % outliers = [ 0 0...

9 years ago | 1

| accepted

Answered
insert several zeros between two samples
This seems to do what you want, given the sample time vector you provided: tN=[0.985,1.36,1.58,2.65]; ...

9 years ago | 0

Answered
Plotting the following equation L=((N^2)*muo*Ag1)/(x+((g*R)/(2*h)))
Your code works except for your not vectorising the division (replace *|‘/’|* with *|‘./’|*) in the *|‘L’|* calculation: L...

9 years ago | 0

| accepted

Answered
Change LineWidth / LineStyle of stepplot() / bodeplot()
The Control System Toolbox plotting functions are resistant to most attempts to modify their plot characteristics. If I want a ...

9 years ago | 1

| accepted

Answered
calculate the gradient f=@(x) (x(1)-2)^4+(x(1)-2)^2*x(2)^2+(x(2)+1)^2
With the Symbolic Math Toolbox: syms x1 x2 % f=@(x) (x(1)-2)^4+(x(1)-2)^2*x(2)^2+(x(2)+1)^2; f = (x1-2)^4+(x1-2)^2*...

9 years ago | 1

| accepted

Answered
System of equations problem help
_Guessing_ here. You may want this instead: output = A\b;

9 years ago | 0

| accepted

Answered
How do you prompt the user and solve the equation
Asking for the temperature and units is straightforward: prompt = {'Enter temperature', 'Enter unit (F, C, K)'}; dlg_ti...

9 years ago | 0

Answered
Solving a system of higher order differential equations with ode45 ...error
Try this: syms g(n) f(n) n Y % C=g^-(1/3); Pr=.7; gamma=1.4; Me=3; gw=1+sqrt(Pr)*((gamma-1)/2)*(Me^2) %...

9 years ago | 0

| accepted

Load more