Answered
How can I bulid the exponential envelope of a damped second-order system oscillator?
One option is presented in Damped harmonic motion curve fit where the exponential envelope function is one of the parameters the...

4 years ago | 1

| accepted

Answered
Select certain peaks of a graph on only values of over 50
Use the 'MinPeakHeight' name-value pair: [pks,locs]=findpeaks(B{1,1}, 'MinPeakHeight',50); .

4 years ago | 1

| accepted

Answered
Renaming the variabel while Symbolic to function handle conversion with matlabFunction
To get the ‘A’ values as a vector, put them in square brackets []. func = matlabFunction(F1d, 'Vars',{[A1,A5],xdata,ydata}) ...

4 years ago | 0

| accepted

Answered
Can't get the four values I need
They are roots of 16th degree polynomials — syms a b l w equ1=648.4-b-a-2*l*w; equ2=3893.78-a*b-2*b*l*w-w^2; equ3=1835.22-2...

4 years ago | 1

| accepted

Answered
Converting linear scaled magnitude and phase to complex Values
If it is not in dB, then the conversion is straightforward — cplxv = S11MAG .* exp(1i*deg2rad(phase)); That should produce th...

4 years ago | 2

| accepted

Answered
legend - missing description colors and signs
The legend also does not have the box around it, and I see not specific calls to suppress it. This was a problem several mont...

4 years ago | 0

| accepted

Answered
I would like to write a for loop to calculate fwhm value based on a range of Strain values. Say Strain = 50:10:150 and find the corresponding fwhm values in a vector
Calculating the width for every value of ‘Strain’ is reasonably straightforward — X = (0:0.01:0.3); Y = -9200*(X).^2 + 2760*X...

4 years ago | 0

Answered
I am not getting a linear plot, how can I get a plot that consist all the data points?
You are asking it to read 30 rows across 4 columns, and it is doing exactly that — T1 = readtable('https://www.mathworks.com/m...

4 years ago | 0

| accepted

Answered
How to count the number of peaks from a graph with a certain threshold?
The findpeaks function only works on vectors, so assuming that the first column of the Excel file is the independent variable an...

4 years ago | 0

| accepted

Answered
How to make an axis that goes up and down?
The tick values must be monotonically increasing or decreasing. The tick labels can be whatever you want. x = 0:15; y = -0....

4 years ago | 0

| accepted

Answered
How to add legends?
Try this — r1=[19.38 65.3 15.32;16.66 62.13 21.21;18.21 58.31 23.49;19.11 59.95 20.94;16.53 67.27 16.19;19.41 63.87 16.72]; ...

4 years ago | 1

| accepted

Answered
Common part of 2D and 3D plot
I am not certain what result you want. It is straightforward to rotate the 3D plot to give a 2D view from the Z-axis — Uz =...

4 years ago | 1

| accepted

Answered
plot a surface for g-f=0
That is challenging, however it will work with certain restrictions on the matrix dimensions (i.e. they must both be the same si...

4 years ago | 0

| accepted

Answered
How can i generate a noise signal of specific frequency range like a noise signal from 100hz to 150hz .
Generate a random signal (perhaps using randn) of an appropriate size, and then filter it (perhaps using bandpass).

4 years ago | 0

Answered
Trouble trying to plot the output of an input signal with an impulse response
Use the fplot function — syms t s; x = (5/7)*exp(-t) - (12/7)*exp(-8*t); % x = x(t) h = cos(2*t) + 4*sin(2*t); % h = h(t) ...

4 years ago | 0

Answered
How to fixed the axis order in hist3 plot?
The problem may be using imagesc. Try set(gca, 'YDir','normal') x = randn(100,1); y = randn(100,1); data = [x y]; figu...

4 years ago | 0

| accepted

Answered
Convert numerical label Vector to char label
Try this — map = {'as','be','ce'}; % Cell Array a=[1 1 2 1 3 1 3 2]; b = map(a) b = strtrim(sprintf...

4 years ago | 0

| accepted

Answered
Errorbars on a select dataset
Try this — data2 = sortrows(randn(10,5),2); % Correct For Missing Data Experimental = sortrows(randn(10,5)...

4 years ago | 0

Answered
Indexing cell array column from excel data
I do not have the matrices, however if they are already imported, use MATLAB indexing conventions to address them — g=Experime...

4 years ago | 0

Answered
Anti-aliasing filter design
Yes, generally. The lowpass function designs a FIR filter by default, and will design an efficient elliptic IIR filter if the '...

4 years ago | 0

| accepted

Answered
How to calculate circular mean every 8 cells?
One option would be to ‘decompose’ the angles into their ‘x’ and ‘y’ components, calculate the means of those, and then use atan...

4 years ago | 0

| accepted

Answered
HI all, would somebody please help me find out what should i do ? there an error in coError: File: FileScema.m Line: 10 Column: 7 Unexpected MATLAB expression.
Perhaps — A = [1 1 1.06 0.00 0.00 0.00 0.00 0.00 0.00 0.00 2 2 1.05 ...

4 years ago | 0

| accepted

Answered
How to estimate different FFT plots using Welch's method
See the documentation on the pwelch function. Its inputs are time-domain vectors (or matrices in which each column of the matri...

4 years ago | 0

Answered
Display string line by line
Use fprintf — str = {'cats', 'dogs', 'birds'}; fprintf('%s\n',str{:}) .

4 years ago | 1

| accepted

Answered
How to plot contour?
Another option would be contour3 — % Make x-y mesh grid x = [-4.2195; -5.7195; -7.2195; -8.7195; -2.7195;...

4 years ago | 0

Answered
Contour comparison with same colorbar limits.
As far as plotting them, in order to see the differences, it would likely be better either to subtract the two surfaces and plot...

4 years ago | 0

Answered
Hi, do anyone know how to remove grid from the pressure contour?
I am not certain what you want to do. Perhaps: surfc(xq,yq,pq, 'EdgeColor','none') is the desiured result? % Make x-y m...

4 years ago | 0

| accepted

Answered
From EMG data set, how can I extract 3 signals of 20 second lengths starting at 40, 80 and 120 seconds?
A relatively straightforward way to do this would be to use the buffer function to create a matrix of 20-second samples, and the...

4 years ago | 0

| accepted

Answered
Hi. I need some help about Spectrograms
I would use the pspectrum function for this with the 'spectrogram' option, since the units and results are easier to interpret. ...

4 years ago | 0

Answered
How to detect flat peaks in a signal
Without the data to experiment with, perhaps using the gradient funciton to help detect the irregularities may be helpful. Th...

4 years ago | 0

| accepted

Load more