Answered
Repeating elements in a vector
@Furkan Sencer Kaçar, A = [0,1; 1; 5; 10; 20] is not valid because it uses a comma as well as semicolons. I assume you meant...

2 years ago | 1

Answered
2nd Order Non-Linear Equation Numerical Solution and Plot
@Conlen O'Brien, tspan=[0 10]; x0=[-25 0]; A=1; B=1; [t,x] = ode45(@(t,x) [x(2);-A+B*x(2).^2], tspan, x0); Do you think the...

2 years ago | 0

| accepted

Answered
How to obtain the translational and angular accelerations of center of mass in rigid body
@Feng, I have moved my comment to an answer, since that is what I intended. To start, we should know the positions of the senso...

2 years ago | 0

Answered
How to do FFT on I,Q data
@Ankit, Let's assume you have read in data from a two-column file. Column 1 is in-phase, column 2 is quadrature. N=256; fs=1...

2 years ago | 1

Answered
Getting an equation from a signal transfer function
@Sifiso Mzobe, There are two distinct threads in this discussion. One thread is an answer to your original quesiton: 'I meas...

2 years ago | 0

Answered
a code that works before started working so why
@Min Khant, This method makes things look a lot more complicated than necessary. The state vector x() has the usual components...

2 years ago | 0

Answered
FFT Analysis Issue: Unexpected Harmonic Multiples in Vibration Signal Frequency Plot
@Valeriya Kostyukova, [edit: corect typos] I agree with @Star Strider that you are plotting the 2-sided spectrum, and that is ...

2 years ago | 0

Answered
How to add vertical axis break to given plotting scheme
@Tristen, Check these out at the File Exchange: https://www.mathworks.com/matlabcentral/fileexchange/45760-break-y-axis?s_tid=...

2 years ago | 0

| accepted

Answered
Heart rate signal using simulink
@Rakan Khair, You replied that you are afraid that the ECG board (Arduino board) has noise. Let's collect some data to see if ...

2 years ago | 2

| accepted

Answered
How to find largest Lyapunov exponent for the second order forced duffing oscillator by using the time series data [obtained by ODE45]?
@PONNADA, If you have access to the Control Systems toolbox, do lyapExp = lyapunovExponent(X,fs) where X is the signal and Fs...

2 years ago | 2

| accepted

Answered
How to plot FFT and spectrogram of I-Q data?
@Meghna Roy Chowdhury, Since you did not provide the data file, I have created a complex signal y(t) composed of band-limited G...

2 years ago | 0

Answered
How to plot FFT and spectrogram of I-Q data?
@Meghna Roy Chowdhury, I assume the data is in a file called "filepath", that you want to open the file for reading (hence the ...

2 years ago | 0

Answered
How to tweak an equation to properly fit a dataset using lsqcurvefit?
“Think??” Makes me chuckle :) Interesting plot and interesting that all pressures are unique.

2 years ago | 0

Answered
How to tweak an equation to properly fit a dataset using lsqcurvefit?
@Juneight, {Edit: Dimensional analysis needs changing because now you say x3 is [Pa] and before you said x3 is [m]. You sai...

2 years ago | 0

Answered
Why does my random walk simulation come out so weird?
@Kevin Nelson, Your formula introduces an increaing probability of "stay the same on each step" as M, the number of walks, grow...

2 years ago | 0

Answered
My graph is not picking up my time increments, its suppose to have a nice curve, but its coming out as a straight line.
@BAILEY MCMASTER, clear Ts=30; % ms Td=60; % ms Chs=.001; % L/mmhg Chd=.015; % L/mmhg N=800; % number of elements t=0:1:8...

2 years ago | 0

| accepted

Answered
Multiple errors- Not that great at Matlab :(
@azaandria, It looks like 3 errors but it is really only one error. Error using DynamicResponse/parfor%supply_1 Index in posi...

2 years ago | 0

Answered
help me with for loop
@nirwana, @Stephen23 knows more about Matlab than almost anybody. When he says "I doubt there is much of a difference", I think...

2 years ago | 0

| accepted

Answered
Largest portion of largest correlation coefficient
@Roohollah, I will suggest an approach, but first, why do you want to do this? It sounds suspicious: like you are selecting a ...

2 years ago | 0

Answered
calculate volume from iso-surface coordinates (x,y,z).
@Raju, Find the delaunay triangulation of the 3D points with DT=delaunay(x,y,z); This gives a set of tetrahedrons which fill...

2 years ago | 0

Answered
Take the product of two probability density function histograms generated from data
@David Gillcrist, Since you did not provide data, let's create some. x1=rand(10000,1)+rand(10000,1); % pdf(x1) = triangle fr...

2 years ago | 0

| accepted

Answered
Solving system of odes with a power using ode45
@Thomas TJOCK-MBAGA, Yes you can do it with ode45(). dX/dt = -0.000038*X - (X*(X/Xinit)^frac)*rext dY/dt = - 0.000038*Y + re...

2 years ago | 1

Answered
Random number generate - Specific values
@Guilherme Lopes de Campos, x=[7,8.5,9.625,12.25]; z=x(randi(4,1,7)) % 7 randomly selected from x z=x(randi(4,1,5000)); % 5...

2 years ago | 0

Answered
How to make a nonperiodic signal periodic?
@Matthew, If your goal is for the signal to repeat so that x(7...14)=x(0...7), and x(-7...0)=x(0...7), then I recommend using m...

2 years ago | 0

Answered
How do I change datetime values?
@Marcus Johnson, dt1=datetime(1978,12,1)+(0:1/24:23/24); % each hour of the day dt1.Format="yyyy-MM-dd HH:mm"; disp([dt1(1), ...

2 years ago | 0

| accepted

Answered
How to optimize the problem?
@Hamid Iftikhar, We know from symmetry that the best collector angle will be when the collector points south, i.e. when collect...

2 years ago | 0

| accepted

Answered
How to optimize the problem?
@Hamid Iftikhar, You ask: "How can I get beta and Z as optimum scalar value that generate whole vector 'th' with values less th...

2 years ago | 1

Answered
Inertial Sensor Noise Analysis With Varying Frequency
@Tanner, [edit: fix typos] You do not have to set maxNumM=250 just because your sampling rate is 250 Hz rather than 100 Hz. Yo...

2 years ago | 1

| accepted

Answered
How to determine stability of transfer function from Nyquist?
@Ali Almakhmari, The answer depends on the form of the transfer functions which you have. Do you have hundreds of polynomials...

2 years ago | 0

| accepted

Answered
Function "diff" and the loss of an element in the array
@Bryan Ambrósio, [edit: changed the code for plotting d2xdt2. The plotted result is unchanged, but the new verison of the code ...

2 years ago | 0

Load more