Answered
fft of sin(pi*x/5)./(pi*x) returns NaN
When ‘x’ is 0, ‘G’ becomes 0/0, and the IEEE standard defines that as NaN. Any NaN in a vector will propagate through all calcu...

7 years ago | 1

| accepted

Answered
Certain functions not available.
The ischange function was introduced in R2017b. Your best option would likely be to upgrade to a more recent release. Workar...

7 years ago | 0

| accepted

Answered
standard separation of x axis tick marks
Plot them using semilogx: % Output Variable Section: subplot(1,2,1) semilogx(omega,decibels),xlabel('Omega (rad/s)'),ylabel(...

7 years ago | 0

| accepted

Answered
How to amplify the signal?
Multiply the vector or matrix by a constant greater than 1, and use the sound (not soundsc) function to listen to it.

7 years ago | 0

Answered
Editor window not opening in Matlab
There is a small white down-pointing arrow in a white circle in the upper right corner of the Editor toolstrip. Among the optio...

7 years ago | 1

Answered
Plotting the orientation of lines
Try this: A = [99.1862290400000 102.281400300000 97.1587243900000 97.3460346000000 104.227574300000 8...

7 years ago | 0

| accepted

Answered
I want to save all the values of e1 and e2 and then I want to plot them
There are several ways to approach this. This causes the least disruption to the code you posted: n = 0.22; r = 0.9; av =...

7 years ago | 0

| accepted

Answered
How to convert .csv file into audio file
Using numbered variables is never a good idea. Do this instead: T=readtable('2khz.csv'); A = table2array(T(:,3:8)); Then,...

7 years ago | 0

| accepted

Answered
Probelm with 'writecell'
Try this: m = readcell('rawdata.csv'); writecell(m(2:end,:), 'modified_data.csv'); If that does not work, upload (attach) ‘r...

7 years ago | 0

Answered
Plotting a bivariate function and a tangent line on the same graph
To plot them simultaneously, you need to use the hold function. See if this does what you want: f = @(x,y) x.^2 + 3*(x.^2)....

7 years ago | 0

| accepted

Answered
Apply Chebyshev filter to sea surface temperature (SST) data
‘I do not understand what should be the inputs for my problem.’ There are several different filter types. The Chebyshev desi...

7 years ago | 0

Answered
Convert Differential Equations to Spate Space
In order to convert your equations to a state-space representation, you need to linearise them. This involves taking the Jacobi...

7 years ago | 0

| accepted

Answered
Can 'cascade' be used on bandstop filters created with 'designfilt'?
If you want to design a filter with multiple stopbands, it is likely easier to do this with a FIR filter. For example: Fs =...

7 years ago | 0

| accepted

Answered
Graphisdag was not found
First, run these: restoredefaultpath rehash toolboxcache then see if that corrects the problem. If the problem persists ...

7 years ago | 0

| accepted

Answered
How can i make envelope cover first half peak at origin?
The envelope function apparently does not recognise the centre peak as a peak, since it is at one end of the sequence. You ca...

7 years ago | 1

| accepted

Answered
I am having this error. Could you help?
It is likely better to use the fullfile function than to cd to the path. I would define ‘keyfile’ as: keyfile = fullfile(pa...

7 years ago | 0

Answered
how to calculate the area under a curve?
‘I would also like to calculate portions of that area.’ Use cumtrapz, and then subtract the values of the limits: x=[0:100]...

7 years ago | 2

Answered
How does one plot only the maximum y value for an x value with multiple y values?
The accumarray function is perfect for this: D = load('y4-T4.mat'); T4 = D.T4; ...

7 years ago | 1

| accepted

Answered
Excel Columns to Matlab Array
I would use the readtable function if your have R2013b or later. You can probably then convert it into a timetable array (R20...

7 years ago | 0

Answered
How to reconstruct a tidal elevation time series from tidal constituents?
I am not certain what you want. Try this: t = linspace(1, 24, 96); % Time Vector Amp = rand...

7 years ago | 0

| accepted

Answered
Need help filtering csv by values inside column
Try this: A = [2 23 2 39 2 40 5 12 5 9 9 29 9 85]; [UA1,~,Ix] = un...

7 years ago | 2

| accepted

Answered
Graph not large enough to contain thick line
Rather than plotting a thick line, use a patch object instead for the standard deviations: x = 0:99; ...

7 years ago | 0

| accepted

Answered
Fit theoretical x-y data set to experimental data set
I have no idea what your actual function is, or what you are doing. I would do something like this: function fd = myFunc(x)...

7 years ago | 1

Answered
How to change colour of binary vector
We don’t have your data so can’t run your code. Try this: x = 0:19; y = sin(2*pi*x/19); a = randi(5, 20, 1); b = randi(5...

7 years ago | 0

| accepted

Answered
Unable to convert expression into double array.
One way is to integrate it numerically rather than symbolically: syms w fun1pdf(w) = exp(w)/((1+exp(w))^2); fun1mu(w) = w^3...

7 years ago | 0

Answered
How to take all output from while loop?
I cannot run your code without your files. However see if this solves the problem with your while loop: k = 1; whi...

7 years ago | 0

| accepted

Answered
Datetime conversion in numeric form (matrix)
If you want to convert them into date numbers, use the datenum function: timeNr = datenum(time); If you want to convert them ...

7 years ago | 0

| accepted

Answered
how to calculate the summation of a function having two variables.
The summation is across ‘f(x,y)’, not only ‘y’, so the function must work for all values of the arguments. The only way to do t...

7 years ago | 1

Answered
Plotting FFT Spectrum using Square Wave
Two problems: First: ‘fs’ is the inverse of the sampling interval, or 1E+6. Second, your code is correct although your plot...

7 years ago | 0

| accepted

Answered
How to display latex expression with natural log in a plot's legend?
You have to begin and end each part of the expression with dollar-signs ($). So: '$e^\frac{ln(k)}{k}(t-k)$' and so for the...

7 years ago | 1

| accepted

Load more