Answered
numerical integration with borders
One approach: x = linspace(350, 1100, 2000); % Create Data y = sin(2*pi*x/50) + 2;...

9 years ago | 0

Answered
How to pass a control parameter to feval() in a loop?
*_’... I run into an error’_* Not surprisingly. There is no reason to use *|feval|* with *|ode45|* when you are passin...

9 years ago | 0

Answered
Is my attempt for simulation SIR model correct?
I’m _guessing_ here. _Assuming_ that you implemented the ODE function correctly, differences in the ODE solver used could l...

9 years ago | 0

Answered
Formating String Parameter Left of Decimal
I wrote a little utility function for my own purposes to do this a while ago: engstr = @(x) [x*10.^(-3*floor(log10(abs(x))...

9 years ago | 0

| accepted

Answered
How can I select specific values using this loop?
I would not use the loop, and instead use MATLAB’s ability to use vectorised commands: x = linspace(0, 360, 7); s = sin...

9 years ago | 0

Answered
Conversion of an Matrix
Use the <https://www.mathworks.com/help/matlab/ref/hankel.html *|hankel|*> (link) function to create a Hankel matrix: A = ...

9 years ago | 1

| accepted

Answered
Low-pass filter in Matlab / Python for removing movement noise
That filter is straightforward to design with Signal Processing Toolbox functions. A bandpass filter (eliminating d-c offse...

9 years ago | 1

Answered
Function subsindex is not defined for values of class 'cell', choose specific components
I am not sure what you want to do. To address cells, use curly braces *|‘{}’|*: l = size(J,2); for o = J{1}:J{l}; ...

9 years ago | 0

Answered
Error when i create functions in sys
The <https://www.mathworks.com/help/signal/ref/square.html *|square|*> (link) function is part of the Signal Processing Toolbox....

9 years ago | 0

Answered
"Function definitions are not permitted in this context." ? bisection
You most likely need to save your functions to their own individual *|‘.m’|* files. Then you can call them as you would any oth...

9 years ago | 0

Answered
What kind of noise it is?
It _appears_ to be relatively low-amplitude broadband noise. However since your signal appears to have most of its energy below...

9 years ago | 0

| accepted

Answered
putting some matrix in a cell arrays
*_‘How could I do it?’_* You just did it! W{1}=m1; W{2}=m2; W{3}=m3;

9 years ago | 0

Answered
How to plot this function ?
Try this: epsilon = @(t) 0.5*(t == 0) + 1*(t > 0); t = linspace(-1, 1); figure(1) plot(t, epsilon(t)) ...

9 years ago | 0

Answered
How to remove artifacts from a signal
Try this: D = load('signal.mat'); signal = D.signal; t = (0:length(signal)-1)'; % Creat...

9 years ago | 2

Answered
Any guidance how to solve this, really need this and will be grateful for any help.
I cannot see any way to vectorise this, so slogging through it with nested loops seems to be the only option. *_The Code_ —...

9 years ago | 1

| accepted

Answered
Unknown software for wind pressure diagram
I have no idea what software created them (that would likely be in the ‘Materials and Methods’ section of the paper they were p...

9 years ago | 0

Answered
Writing Coefficients of a Summation?
See if this does what you want: n = 6; % Arbitrary Constant P = 3; ...

9 years ago | 0

Answered
Continuously update MATLAB surf plot and animate it
I am not certain exactly what you want to do, and I cannot run your code to test this with it. See if this example offers s...

9 years ago | 0

| accepted

Answered
How to fit Plane (z=ax+by+c) to 3D point cloud data?
Try this: arr = xlsread('Step_scan01_ex.xls'); x=arr(:,1); y=arr(:,2); z=arr(:,3); DM = [x, y, ones(si...

9 years ago | 2

| accepted

Answered
What is the maximum phase that a bode plot can show?
The *|bode|* function in your example already appears to be using the *|unwrap|* function, since the phase is beyond the usual *...

9 years ago | 0

| accepted

Answered
Filter out a particular frequency from a mixed signal
With a *|1|* MHz sampling frequency, it is not possible to implement a discrete |FIR| or |IIR| filter for a *|50|* Hz signal tha...

9 years ago | 0

Answered
Why is my plot not showing a line?
You are only plotting one point, so specify markers in your *|plot|* call: plot(timpact,maxheight,'*r', xt,yt,'+b');

9 years ago | 1

| accepted

Answered
I want to solve and plot this equation in matlab.
First, use the Symbolic Math Toolbox to create your ODE function: % % Differential Equation: y"+y*y'+y^2 == x^4-2*x^2+x-2 ...

9 years ago | 1

Answered
hwo to normalise the points with matlab command
The function you want is in the File Exchange: <https://www.mathworks.com/matlabcentral/fileexchange/54544-normalise2dpts-pts-?f...

9 years ago | 0

Answered
Need help shrinking axis'
Try this: i = 1; width = 0.1; depth = 0; d= 0; while width<20 a(i)=sqrt(1+400/(width(i).^2)); ...

9 years ago | 0

Answered
What is role of "/" between two matrices?
For a full description, see the docmuentation for the <https://www.mathworks.com/help/matlab/ref/mrdivide.html *|mrdivide|*> (li...

9 years ago | 0

Answered
Using end as a variable to access parts of array
Using *|end|* should work. (I don’t know the MATLAB version when it first indicated the last element in a vector.) These a...

9 years ago | 1

Answered
Help Debugging Code? Says there are not enough input arguments
According to the function declaration line, *|‘DisplayStockData’|* wants *|4|* inputs and produces one output: stockdata =...

9 years ago | 0

Answered
Why am I getting this error?"Error using input The first argument to INPUT must be a character vector. Error in HailstonePath (line 4) input(num);"
The *|input|* function wants a prompt string: num = input('Give me a number! ') if (num>0) . . .

9 years ago | 1

Answered
How to plot 3d vectors along x-axis as well y-axis to demonstrate the production of circularly polarised light?
You need to provide a vector of *|zeros|* (here *|‘zv’|*), then plot that as the *|‘y’|* and *|‘z’|* values for the two sine cur...

9 years ago | 0

| accepted

Load more