Answered
Fill three areas in a plot with one line
I am not certain what you want. Try this: x = sort(rand(1, 20)); y = rand(1, 20) + 0.5; ylow = 0.3; ...

8 years ago | 0

Answered
How can I bandpass filter (0.7 to 4 Hz) a signal using a 128-point Hamming window?
There is no agreed-upon way to calculate the order of an |FIR| filter. A good discussion is in <https://www.dsprelated.com/show...

8 years ago | 0

| accepted

Answered
How to fit a custom equation?
I get good results with this: yf = @(b,x) b(1).*(1-exp(-b(2)*(b(3)+x))); B0 = [5000; 0.01; 10]; [Bm,normresm] = ...

8 years ago | 0

| accepted

Answered
Running an error when attempting to set gca YTick marks.
We need more information about the values you’re plotting. Experiment with this: yt = get(gca, 'YTick'); energy_pi...

8 years ago | 0

| accepted

Answered
Issues with sym engine running
A recent Windows 10 update causes this problem. See <https://www.mathworks.com/matlabcentral/answers/399991-syms-sym-and-mu...

8 years ago | 1

Answered
Amplitude-Frequency response peaks at zero, how to fix?
The peak at *|0|* Hz is the direct-current (d-c) or constant offset. You can eliminate it by subtracting the *|mean|* of the si...

8 years ago | 2

| accepted

Answered
How do I fix the error "Line 10: Parse error at 2: usage might be invalid MATLAB syntax"?
You either need an arithmetic operator (addition, subtraction, muyltiplication, division or the element-wise vectorized versions...

8 years ago | 0

Answered
Rectify the error in imread
Your |'itsarose.jpg'| image has to be in the MATLAB search path for *|imread|* to find it. If it is not, you have to provide th...

8 years ago | 1

Answered
I need help fully transcribing my ODE to Matlab
I can only _guess_ as to the reason the error continues to be thrown. You could have ‘overshadowed’ the *|exp|* function someho...

8 years ago | 0

Answered
Need Help Transcribing differential equations in to Matlab code
The syntax of your function is correct. However you need to spend some time with the documentation. Specifically see the d...

8 years ago | 0

Answered
How do I graph a vertical hemisphere with a radius of 1 and center of (0,0,0) in MATLAB?
Use the <https://www.mathworks.com/help/matlab/ref/rotate.html *|rotate|*> (link) function to change the orientation of the hemi...

8 years ago | 3

| accepted

Answered
ga function Input data
Try making *|‘FindAC’|* a function _only_ of *|‘x’|* for *|ga|*: ga(@(x)FindAC(x,val),2,[],[],[],[],lb,ub,[],intcon) Th...

8 years ago | 0

| accepted

Answered
Matlab is storing all of my data in a 1x1 cell
With respect to your *|textscan|* call, you most likely need to add *|'HeaderLines',5|* to make it work: DataArrayC = tex...

8 years ago | 1

| accepted

Answered
Unity coefficient in symbolic polinomial
This is one approach: syms x s f = 5*x^3 - 3*x^2 + 2*x - 1; polynrm = @(p,v) vpa(poly2sym(poly(roots(sym2poly(p...

8 years ago | 0

| accepted

Answered
Why am i receiving "Conversion to double from tf is not possible."
The output returned by *|tf|* is a structure of cell arrays. If you want to get the numerator and denominator from the transfer...

8 years ago | 0

| accepted

Answered
Ploting a function and its roots
The *|fzero|* function will only return one value for each initial estimate. You need to provide different initial estimates in...

8 years ago | 0

| accepted

Answered
Inserting slice into a scatter 3D plot
With respect to that example, add the lines between *|hold on|* and *|hold off|* in this code to get the plane you want: s...

8 years ago | 1

Answered
setting length of variable
Yes. Use the <https://www.mathworks.com/help/matlab/ref/linspace.html *|linspace|*> (link) function.

8 years ago | 0

| accepted

Answered
How can I make a 2D color plot
Try this: x = rand(1, 5); % Create Data y = rand(1, 7); ...

8 years ago | 0

Answered
VPASolve() only one Solution instead of two Solutions
One option is to use *|solve|* first, then *|vpa|* on each solution: Ss = solve(poly); Ss1 = vpa(Ss(1)) Ss2 = vpa(Ss...

8 years ago | 1

Answered
Please help! Am trying to find a
You are missing a multiplication operator. MATLAB does not recognise implied multiplication. eqn = 5000 + 6800 - 10876 *...

8 years ago | 4

Answered
3D plot with different x-y resolution
Yes. However you cannot plot a scalar against vectors, so one way to do it would be: x1=[0, 0.5, 1.0]; y1=[2, 3, 6]; ...

8 years ago | 0

Answered
How to get the transfer function of a system according to its discrete impulse response
Start by preparing your input and output data with the *System Identification Toolbox* <https://www.mathworks.com/help/ident/ref...

8 years ago | 0

| accepted

Answered
problems with plot3
Try: omega = linspace(2, 10, 200); d = linspace(0, 10, 200); Note that *|‘k0’|* is a scalar, and *|plot3|* wants equ...

8 years ago | 0

| accepted

Answered
how to plot implicit functions, witch given as matrix?
*_‘... t1 and t2 are not the same time vectors ...’_* You can make them be the same (for all intents and purposes) by defin...

8 years ago | 0

Answered
Finding parameters of ODEs using lsqcurvefit
You are actually fitting two vectors, *|‘COD’|* and *|‘Fcl’|*. (That was not immediately obvious.) They have to be in _one_ ma...

8 years ago | 2

| accepted

Answered
How to take the average of the columns of a matrix and insert into a column matrix
A slight variation on my previous code works here: fidi = fopen('file.txt','rt'); c = textscan(fidi, '%f%f%f', 'Delimit...

8 years ago | 0

| accepted

Answered
Transfer function estimation from experimental data
This is the best I can do: d = load('td_data.mat'); Fs = 100E+3; ...

8 years ago | 0

Answered
How to read only the data between the single quotes in the following example?
I am not entirely certain what *|‘S1’|* is because you have not provided it, so this is a *_guess_* of what the problem may be....

8 years ago | 1

| accepted

Load more