Answered
Integration of acceleration signal for complex modulus calculation
My guess is that the first integration is also creating a constant of integration, and that would show up as a constant offset t...

6 years ago | 0

| accepted

Answered
Trying to plot symbolic function
Try this: figure(1) fplot(y_1, [1E-3 1E+3]) grid The rest of the code is unchanged.

6 years ago | 0

Answered
Simple Unit Conversion, Undefined variable Error
The ‘y’ response needs to be a string (actually, character vector): y = input('Enter the input Units(cm,mm,in,ft): ','s'); Se...

6 years ago | 1

| accepted

Answered
Finding row-averaged magnitude spectrum
Assuming that I understand what you want to do, I would do something like this: blur = rand(512); L = size(blur,1); ...

6 years ago | 1

| accepted

Answered
solving nonlinear ode for a set period
See the documentation section on ODE Event Location.

6 years ago | 0

| accepted

Answered
How to stop Matlab from execution when it reaches a certain value for specific variable when I use ode45?
Since ‘R’ is not a normal output for ‘rate’, an Events function is unfortunately not going to be helpful. Adding: for k = 1:...

6 years ago | 2

| accepted

Answered
Non linear grey box estimation
The ‘Too many input arguments’ error means that sim is attempting to pass more input arguments than ‘model’ permits. This is fr...

6 years ago | 0

Answered
How to change the frequency of a high pass filter in real time?
I would design two filters — one for each cutoff frequency — and filter the signals in parallel, so the same signal is presented...

6 years ago | 0

| accepted

Answered
How to apply a Farrow structure delay filter(FIR) to a signal in Matlab?
I cannot run your code because: Unrecognized function or variable 'Delay'. and ‘L’ is missing as well. However, if you n...

6 years ago | 1

| accepted

Answered
How to apply a Low pass filter on a set of data from Excel
First, import the data using readmatrix or readtable, and determine the sampling frequency (it must have regular sampling interv...

6 years ago | 0

Answered
Matlab 2018a fit function wrong coefficients
The 'Normalize','on' name-value pair tells the function to centre and scale the data. This is appropriate for some situations w...

6 years ago | 0

| accepted

Answered
How do I find and plot the average of action potentials from a trace?
This was something of a challenge this m,orning. Try this: UZ = unzip('4peaks.zip'); D = load(UZ{:}); C1 = struct2cell(D)...

6 years ago | 0

| accepted

Answered
yyaxis right : no scientific notation
See the Numeric Ruler Properties Exponent documentation section to set the exponent.

6 years ago | 0

| accepted

Answered
error with index and array elements
In this line: Xhist=X+f*h; % Euler's method ‘XHist’ is re-defined as a scalar. That’s causing the problem. I...

6 years ago | 0

| accepted

Answered
How to plot boundary of contour??
For a working example, see: how to fill the interior of a closed surface?

6 years ago | 0

Answered
Invalid syntax: Might be missing a closing
You’re missing an operator! (Actually several of them!) In: Vcap=(1/3)*pih^2*(3R-h); there should be something between ‘R...

6 years ago | 0

| accepted

Answered
Plotting 3D graph
Try something like this: D = readmatrix('YourDataFile.something'); N = 250; xv = linspace(min(D(:,1)), max(D(:,1)), N); y...

6 years ago | 0

Answered
Set Square root axis scale
Experiment with this approach to get the result you want: x = 0:100; y = rand(size(x))*512; figure plot(x, y, '.') grid ...

6 years ago | 0

| accepted

Answered
I can't plot my function
Try this: syms x_rt y_rt Pp_Pr = 0.3; alpha = 100; % x_rt = [0.1;0.01;1]; Eqn = x_rt == y_rt * (1 + Pp_Pr * (1-y_rt) * (a...

6 years ago | 0

Answered
how to fill the interior of a closed surface?
Try this: D = readmatrix('Boundary_closed_1s_3s.txt'); figure [c,h] = contour(D, [1 1]*0.5); Levels = h.LevelList; idx =...

6 years ago | 1

| accepted

Answered
Matlab coding issue with "fprintf" function
My version of MATLAB will not run images of code, only actual code, and I have no desire to type all of that in. See if: fp...

6 years ago | 0

| accepted

Answered
How to do interpolation in matlab??
I am not absolutely certain what you want to do. The row lengths between unique values in the first column are not the same, ...

6 years ago | 0

| accepted

Answered
How to Plot Grid on a Scatter Plot?
Depending on the result you want, here are some options to experiment with: [x,y,z] = sphere; %# Makes a 21-by-21 point s...

6 years ago | 1

| accepted

Answered
Bode Diagram Plot specification (magnitude)
That would likely be next to impossible using the bode function itself. The best option is to get the outputs from bode as desc...

6 years ago | 1

| accepted

Answered
simulate State Space system with lsim
For a SISO system, ‘t’ needs to be a vector: t = linspace(0,10); the full code being: A = [0 1 0 0; 0 0 1 0; 0 0 0 1; -2 -5...

6 years ago | 0

| accepted

Answered
How to plot y=-1/3*(x-2)*(x-2.5)*((x/2)-2.75)*((x/5)-3.25)*(x-4)-1.45
The range for ‘X’ is wrong. Try this: X=1.5:0.1:4.1; Y=-1./3.*(X-2).*(X-2.5).*((X./2)-2.75).*((X./5)-3.25).*(X-4)-1.45; ...

6 years ago | 0

| accepted

Answered
My code is stuck on "Busy"; I'm using ode45 and functions for the first time.
Looking at the coefficients, your system is ‘stiff’. Use ode15s (or one of the other stiff solvers) instead. The code is other...

6 years ago | 1

| accepted

Answered
How to find the intersection of two curves (2 points of intersection)
I can’t run your code, since I don’t have the functions. As a general rule however, it is straightforward to find the interse...

6 years ago | 0

| accepted

Answered
Output Error Method for parameter estimation
I would use the ssest function: D = load('dat.mat'); dat = D.dat; sys = ssest(dat, 5); A = sys.A B = sys.B C = sys.C ...

6 years ago | 1

| accepted

Answered
Scaling 0-180 Degrees to 0-1 with 0.0001 Intervals
Try this: v = linspace(0, 1-0.0001, 1/0.0001); with: Out = [v(1:4); v(end-3:end)] producing: Out = ...

6 years ago | 0

Load more