Answered
Can't load .mat file from subfolder
See: Can't load .mat file from subfolder

7 years ago | 0

Answered
Can't load .mat file from subfolder
All the subdirectories on your MATLAB user path must be included in the path definitions. See: What Is the MATLAB Search Path? ...

7 years ago | 0

Answered
morse code encoder with sound
If you change the ‘morsecode2’ assignment and cast it to a char rather than string data type, it works: morsecode2 = morsecode...

7 years ago | 0

| accepted

Answered
Calculate mean from plot of two vectores
In order to calculate the mean, the y-coordinate data would have to be interpolated to the same x-coordinate values, those spann...

7 years ago | 0

Answered
Obtaining integral function from code
At that value, the subscript is no longer an integer. This is most likely a problem with floating-point calculation error. Usi...

7 years ago | 1

| accepted

Answered
long digit scaled fixed point?
I ma not certain what problem you are seeing. The format function may be what you want. For example: format long e n = ...

7 years ago | 1

| accepted

Answered
Why are my array dimensions being changed?
You can add the missing dimension. Experiment with this: x1 = rand(3,4); x2(1,:,:) = x1; To check: x1s = size(x1) x2s ...

7 years ago | 1

| accepted

Answered
Graph with string variable
Try this: [D,S] = xlsread('data.xlsx'); Years = str2double(S(2:end,1)); figure plot(Years, D) grid legend(S(1,2:3)) pr...

7 years ago | 0

Answered
Array dimensions must match for binary array op. error how to solve this problem thanks for all
Apparently ‘InputImage’ does not have the same row, column (and perhaps third-dimension) sizes as ‘ReconstructedImage’. You h...

7 years ago | 0

| accepted

Answered
How can I save a animated line into a video?
Start with the getframe function and its firends, then see: Write Sequence of Images to Video. That should get you started. ...

7 years ago | 2

Answered
How to plot Butterworth filters with own data?
It would help to know the sizes of ‘x’ and ‘h’. You should also have a time vector, so: figure plot(t, h) grid will plot...

7 years ago | 0

| accepted

Answered
Plotting different filtering functions WITH DATA
‘Can I use "plot" to plot my data with this filter and if so how?’ Yes. It depends on what you want to plot. To plot your...

7 years ago | 0

| accepted

Answered
Gap in spectral analysis (Filter applied)
I suspect you are actually using a lowpass filter, then using fftshift on the fft output, although not adjusting the frequency a...

7 years ago | 0

| accepted

Answered
ODE45 how can I format this system of equations?
Try this: function vd = YourODE(t,v,K1,K2,m1,m2,P,R1,R2,x1,x2) xd1 = v(1); xd2 = v(2); vd(1,:) = (1/m1) * (P - R1*(xd1 - xd...

7 years ago | 0

Answered
How to generate a matrix with number of lines inserted from keyboard
You had too many end statements. They were defining very short if blocks, and so some of those blocks did not begin correctly a...

7 years ago | 0

| accepted

Answered
Why is ODE45 using so many intervals?
It will use as many intervals as it needs to. If you want it to output fewer intervals, create ‘tspan’ as a vector of more th...

7 years ago | 1

| accepted

Answered
for loop to get results for each iteration
Your loop is not doing anything except copying your original vectors to new vectors. Try something like this instead: Eedma...

7 years ago | 0

Answered
Save each vector (of different length) produced by a for loop
I’m not certain what you’re doing. I would do something like this: H{m(p),n(p)} = find(time_dec > m(p) & time_dec < n(p)); ...

7 years ago | 1

| accepted

Answered
how to make new variables and values in for loop
Please do not create numbered variables! If you want varying values for different iterations, subscript ‘A’ instead: A(i) =...

7 years ago | 0

| accepted

Answered
Problem with plotting a phase response of a time-series data FFT
See if using the unwrap function on the phase vector (in radians, before transforming it to degrees) has the desired effect. ...

7 years ago | 1

Answered
Problems in opening/importing .asc files with headers.
I was able to read it with this: filename = 'rdata_001.asc'; fido = fopen(filename,'r'); D = textscan(fido, repmat('%s',1, 6...

7 years ago | 0

| accepted

Answered
Rotating 3D cloud matrix data
The rotate function could be an option.

7 years ago | 0

Answered
In Simbiology, is the parameter estimates reliable, if I get the error " Iteration limit exceeded in the Laplacian algorithm. Returning result of the final iteration"
For that function, you can use the options created by the statset function to increase the number of iterations MaxIter beyond t...

7 years ago | 0

| accepted

Answered
Slope of experimental data
To get the instantaneous slope of your data: dydx = gradient(y1) ./ gradient(x); then to plot it: plot(x, dydx) The gradie...

7 years ago | 2

Answered
convert dates in matlab
Try this: D = xlsread('dates.xlsx'); Ds = num2str(D,'%d'); Dn = datenum(Ds, 'yyyymmdd'); Check = datevec(Dn) ...

7 years ago | 0

| accepted

Answered
Linear indices from row and column indices for a rectangular region of interest.
You need to reverse the order of the second and third arguments to sub2ind: indices = sub2ind(size(a), X(:), Y(:)) %this would...

7 years ago | 1

| accepted

Answered
Find intersectionpoint between two functions
Add this line just before the plot calls: intx = (m2 - m3) / (k3 - k2); % X-Intersection and add: plo...

7 years ago | 1

| accepted

Answered
Find maximum in matrix and show
If I understand correctly what you want to do, use the max (link) function. To get the maximum of every column of your matrix...

7 years ago | 0

Answered
FIR and IIR EEG signal
See: How do I eliminate multiple 60Hz harmonics within 1 set of data in an ECG and Help With Starting Point for a Low Pass Filte...

7 years ago | 0

Answered
How to plot an integral
‘But nothing comes out on the graph.’ The result of the int function is a constant. At best, you will get a straight line. ...

7 years ago | 2

| accepted

Load more