Answered
how to control amplitude of step in code
Use stepDataOptions to create an options structure, and specifically the StepAmplitude option — A = randn(3) ...

4 years ago | 0

| accepted

Answered
Store spectrogram with image data format in the MATLAB workspace
I would use the saveas function on the created figure to save it to whatever format is desired (and supported).

4 years ago | 0

| accepted

Answered
how to pass values from a .txt file
Reading the file was another interesting challenge! Try this — T1 = readtable('https://www.mathworks.com/matlabcentral/answ...

4 years ago | 0

| accepted

Answered
Filled Contour Plot Error
Request more contour levels (here I requested 150) — func=@(x,t) (16/3).*(12.*((-4)+4.*exp(1).^(8.*((-1/16)+(-2).*t+x))).^(-...

4 years ago | 1

| accepted

Answered
Setting the xlim for datetime data
Perhaps something like this — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/851315/collated...

4 years ago | 1

| accepted

Answered
Solving a nonhomogeneous ODE system with 'dsolve'
I have no idea what the problem is with this, however I’ve been running it offline on my computer (using a Laplace transform app...

4 years ago | 0

Answered
2D Plot of CSV data
One approach — M = [31.999999999999964 0.19038773875061182 323.5661344306932 31.980976178007637 0.200000...

4 years ago | 0

Answered
replace the equations in the code with the equations in the picture
Assuming these are coded correctly (there appear to be missing and unmatched parentheses) — syms I_o Lambda I_sc R_s I_ph R_sh...

4 years ago | 0

| accepted

Answered
Solve a system of ODEs with varying coefficients
‘Note: kappa(s) and tau(s) vary with s’ Duly noted. I made some changes. See if this produces the desired result — kapp...

4 years ago | 0

Answered
How to implement Reference tracking and control for level of hypnosis in Patients through a pharmacokinetic and pharmacodynamic model.
Unless I missed something in the problem statement, the initial goal is to estimate the parameters. A linear model with identif...

4 years ago | 0

Answered
How of get Initial values of a pharmacokinetic and pharmacodynamic model.
First, supply some of the relevant research papers (as PDFs, since I have personal access only to some medical journals and Scie...

4 years ago | 0

Answered
How can i write this code and plot it on matlab?
I would be tempted to use the Control System Toolbox — R= 10; % k ohm. L = 14.95; % mH C= 0.018013; % pF s = tf('s'); H...

4 years ago | 0

| accepted

Answered
How do i plot one best fit line for multiple data sets?
I would do something like this — x1 = 0:0.5:10; x2 = x1 + 2; x3 = x1 - 0.5; y1 = 1 + 0.2*x1 + randn(size(x1))*0.2; y2 = 1....

4 years ago | 2

Answered
Filtering doubles in a struct by criteria of one double
It seems to work correctly when I run it with random data — % site_data.wlH13 = randn(1,15); % Vect...

4 years ago | 0

Answered
prctile how to calculate
See the prctile documentation section on Algorithms. .

4 years ago | 0

| accepted

Answered
how to graph function
Try this — idx = (f <= 1500) & (f <= 1800) [rpm, freq] = findpeaks(PSD(idx), f(idx), 'MinPeakHeight',0.75E-3) Without the da...

4 years ago | 1

| accepted

Answered
interp1 result not close to sampled curve with rather simple data
The plot call is wrong. It should be something like: plot(x,y, x_val_sampled(11:20), interval(11:20)) Try this — %% x va...

4 years ago | 0

| accepted

Answered
How can I add white Gaussian noise to my clean audio
One option is to use the randn function to generate it. Fs = 14400; t = linspace(0,1,Fs); w = 2*pi*1000; s = sin(w*...

4 years ago | 1

Answered
How to change the properties of a plot obtained from compare(mdl,data) function.
I don’t have the Predictive Maintenance Toolbox so I have no direct experience with it. However it exists with the online Run f...

4 years ago | 0

| accepted

Answered
How to add noise in input of State space model ?
Try this — A = [-3 -1.5; 5 0]; B = [1; 0]; C = [0.5 1.5]; D = 0; sys = ss(A,B,C,D); t = linspace(0, 10, 1500); ...

4 years ago | 0

Answered
How do I retrieve the numbers contained in my table?
use the strrep function to eliminate the comma, then use str2double to do the conversion — format bank sheet_data = table([...

4 years ago | 0

| accepted

Answered
Parse error at zeta.
There appear to be errors in ‘odefcn’ that need to be addressed. I have no idea if ‘f’ and ‘r’ are to be evaluated together (...

4 years ago | 0

Answered
plot x bar and R
I have absolutely no idea what and are. Two possibilities — M = [1 44 26 24 34 2 50 48 51 43 3 32 28 26 ...

4 years ago | 0

Answered
How to Interpolate scalar on new grid
The most likely source of the problem is that ‘x’ and ‘y’ do not have unique values, so neither will ‘X’ and ‘Y’ since they are ...

4 years ago | 0

| accepted

Answered
how to use LTSpice values in Matlab
Try this — filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/844665/Draft3.txt'; T1 = readtable(fi...

4 years ago | 1

| accepted

Answered
Too many input arguments.
The ‘dx1dt’ anonymous function takes 3 arguments — dx1dt = @(x4,x5,u3) x4.*cos(x5*pi/180).*cos(u3*pi/180); ...

4 years ago | 0

| accepted

Answered
How to append different length column matrix to the end of a matrix?
One option is the cat function, another option is to use the square brackets [] concatenation operator. .

4 years ago | 0

| accepted

Answered
how to plot transfer function exported from LTSpice
I have no idea what would be necessary for LTSPice to export in Cartesian coordiantes, however to convert them to Cartesian in M...

4 years ago | 0

Answered
How can I find the carrier frequency and sidelobe frequencies from the following data that i collected on Matlab
The link shows only the plots. This applies to the second plot (of the one-sided Fourier transform of the signal). First...

4 years ago | 0

Answered
Solving two second order ODEs
Essentially, yes. However it could be made a bit more efficient — syms U(t) V(t) %Constants definition a = 1; w = 100; ...

4 years ago | 1

Load more