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...

5 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...

5 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*...

5 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...

5 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); ...

5 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([...

5 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 (...

5 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 ...

5 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 ...

5 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...

5 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); ...

5 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. .

5 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...

5 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...

5 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; ...

5 years ago | 1

Answered
Legend displaying the same color for all lines
Each plot call creates 1000 Line arrays. Just pass the first of each to legend and it works — angle_steps = 1000; theta = ...

5 years ago | 0

Answered
Can you help me guys i cant plot this this graph using matlab
Try this — x = linspace(0, 10); y = 1 - exp(-0.7*x); figure plot(x, y) hold on plot([0.9 1.75]-0.1, [1 1]*0.4, 'k') pl...

5 years ago | 0

Answered
response of state space to arbitrary input
‘what if i want to give a non-trivial input different from step, like a traingular wave??’ Use the lsim function. That is th...

5 years ago | 0

| accepted

Answered
how to find the transfer function from LTspice
Perhaps I am missing something, however ‘the expression of the transfer function i plotted as a function of the frequency’ is es...

5 years ago | 0

| accepted

Answered
How to do symbolic integration
It apparently does not have a symbolic solution (this is not uncommon). It does have a piecewise closed-form solution, at lea...

5 years ago | 2

Answered
Resolve problem of overlapping title and yticks
I cannot reproduce that in R2021b (using synthetic data), however the NumericRuler Properties Exponent property could work. It ...

5 years ago | 1

Answered
How can i find the peak/maxima of a plot in just a selected region?
I am not exactly certain what the problem is, however I am assuming that there are many peaks and the intent is simply to get th...

5 years ago | 0

Answered
I want to use a code but one of the symbol/character I don't recognize, Please help.
The ‘ear’ is the ‘at-sign’ (@) and here is used to denote a function handle. It is used to define anonymous functions, for exam...

5 years ago | 0

Answered
how to find unknown within equation having unknown
I have no idea if this actually has a robust (and mathematically correct) solution. It is always appropriate to experiment, s...

5 years ago | 0

Answered
Source code for Heart Disease Prediction
PubMed

5 years ago | 0

Answered
How do I stop MATLAB from giving me this warning? ( Global variables are inefficient and make errors difficult to diagnose. Use a function with input variables instead.)
The obvious solution is DO NOT USE GLOBAL VARIABLES! Here, thie solution is — x=5; A = hello(x) function A=hello(x)...

5 years ago | 1

| accepted

Answered
Reverse-Engineer Amplified Signal to Obtain Raw Signal
It is somewhat difficult to understand what ‘1 mV/unit’ translates to, since ‘unit’ can be anything. Also, ‘-20 dBV attenuation...

5 years ago | 1

Answered
How to get the corresponding data ?
If only the 24-hour sum is available, it is not possible to get the time history. If the times and incremental volumes are av...

5 years ago | 0

Answered
How to calculate phase difference between 2 periodic signals recorded from oscilloscope?
One approach — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/840620/data.CSV', 'VariableNamin...

5 years ago | 1

| accepted

Answered
How to increase temporal resolution from 3-hourly to hourly data with interpolation?
If the Signal Processing Toolbox is available, the easiest way to do that is with the resample function. .

5 years ago | 0

Load more