Answered

Change datetime display format

It is possible. It just takes some coding gymnastics: tj = 2.456870501842000e+06; mtime = datetime(tj,'ConvertFrom','juliand...

Change datetime display format

It is possible. It just takes some coding gymnastics: tj = 2.456870501842000e+06; mtime = datetime(tj,'ConvertFrom','juliand...

4 Tage ago | 1

| accepted

Answered

how to get a cdf plot of my data

Try this: [f,x,flo,fup] = ecdf(fitness); figure loglog(x, f) hold on plot(x, [flo fup], '--r') hold off grid legend('...

how to get a cdf plot of my data

Try this: [f,x,flo,fup] = ecdf(fitness); figure loglog(x, f) hold on plot(x, [flo fup], '--r') hold off grid legend('...

4 Tage ago | 0

| accepted

Answered

syms 0-by-1

Ther problem is that ‘eqn’ evaluates to: eqn = 5863/20 == 923 so there are no variables in it to solve for.

syms 0-by-1

Ther problem is that ‘eqn’ evaluates to: eqn = 5863/20 == 923 so there are no variables in it to solve for.

4 Tage ago | 0

Answered

Displaying random numbers as a graph

One approach is to use the inpolygon function: x = linspace(0, 10); y = exp(-(x-5).^2)*0.2; r = rand(1000,2).*[10 0.25]; [i...

Displaying random numbers as a graph

One approach is to use the inpolygon function: x = linspace(0, 10); y = exp(-(x-5).^2)*0.2; r = rand(1000,2).*[10 0.25]; [i...

4 Tage ago | 1

| accepted

Answered

Creating a Filter and applying it

See: Realize or Apply the Filter to Input Data

Creating a Filter and applying it

See: Realize or Apply the Filter to Input Data

4 Tage ago | 1

| accepted

Answered

Unit of FFT in matlab

The fft function does not change the units of the time-domain argument it is given. The fft function produces a double-sided ...

Unit of FFT in matlab

The fft function does not change the units of the time-domain argument it is given. The fft function produces a double-sided ...

4 Tage ago | 0

Answered

Predictions for stepwise regression model

No predict function is defined for stepwisefit. One is defined for stepwiselm: m = stepwiselm(matrix , Y) prediction1 = pr...

Predictions for stepwise regression model

No predict function is defined for stepwisefit. One is defined for stepwiselm: m = stepwiselm(matrix , Y) prediction1 = pr...

5 Tage ago | 0

| accepted

Answered

Create a row vector of the diagonal elements from matrix.

Meet the diag function!

Create a row vector of the diagonal elements from matrix.

Meet the diag function!

5 Tage ago | 0

| accepted

Answered

How do you use values from an array as serial numbers to extract values from a different array?

It is not possible to reference ‘row 0’ since MATLAB subscripts begin at 1. I am not certain what you want, so see if this sh...

How do you use values from an array as serial numbers to extract values from a different array?

It is not possible to reference ‘row 0’ since MATLAB subscripts begin at 1. I am not certain what you want, so see if this sh...

5 Tage ago | 0

Answered

How to mix multiple audio signals in Matlab?

It is somewhat difficult to follow your code (and I cannot run it since my version of MATLAB can only run actual code, not image...

How to mix multiple audio signals in Matlab?

It is somewhat difficult to follow your code (and I cannot run it since my version of MATLAB can only run actual code, not image...

5 Tage ago | 0

Answered

Residual values for a linear regression fit

I would do something like this: x = [1,1,2,2,3,4,4,6]'; y = [8,1,1,2,2,3,4,1]'; xv = x; yv = y; for k = 1:numel(x) ...

Residual values for a linear regression fit

I would do something like this: x = [1,1,2,2,3,4,4,6]'; y = [8,1,1,2,2,3,4,1]'; xv = x; yv = y; for k = 1:numel(x) ...

5 Tage ago | 0

| accepted

Answered

ode45 failing but other solvers work fine

Run this from your Command Window or a script: which ode45 -all You should only get: C:\Program Files\MATLAB\R2020b\toolbox...

ode45 failing but other solvers work fine

Run this from your Command Window or a script: which ode45 -all You should only get: C:\Program Files\MATLAB\R2020b\toolbox...

6 Tage ago | 0

| accepted

Answered

How can i visualize ecg contain 12 leads in 12 different figures

This is the standard format for EKG record display: EKGD = load('temp.mat'); EKG = EKGD.signal; Leadc = {'I','II','III','a...

How can i visualize ecg contain 12 leads in 12 different figures

This is the standard format for EKG record display: EKGD = load('temp.mat'); EKG = EKGD.signal; Leadc = {'I','II','III','a...

6 Tage ago | 2

| accepted

Answered

Use vectors to index an 2D array

Use the sub2ind function to create linear indices from the subscripts: X = [1 2 3 4]; Y = [4 3 2 1]; A = zeros(4); Lidx =...

Use vectors to index an 2D array

Use the sub2ind function to create linear indices from the subscripts: X = [1 2 3 4]; Y = [4 3 2 1]; A = zeros(4); Lidx =...

6 Tage ago | 1

| accepted

Answered

Plot range of values in a bar graph

I was not certain what result you wanted when I replied to your Comment to Plot range of values as bars. I gave a sort of gener...

Plot range of values in a bar graph

I was not certain what result you wanted when I replied to your Comment to Plot range of values as bars. I gave a sort of gener...

6 Tage ago | 0

Answered

How to find x-values when y-function equals a set value?

Try this: x = linspace(0.54, 0.61); % Create Data y = exp(-(x-0.58).^2*1E+4); ...

How to find x-values when y-function equals a set value?

Try this: x = linspace(0.54, 0.61); % Create Data y = exp(-(x-0.58).^2*1E+4); ...

6 Tage ago | 0

| accepted

Answered

changing sampling rate of an audio

Import the file, then use the Signal Processing Toolbox resample function to resample it to a different sampling frequency.

changing sampling rate of an audio

Import the file, then use the Signal Processing Toolbox resample function to resample it to a different sampling frequency.

6 Tage ago | 0

Answered

Converting Frequency domain to time domain

‘How do I convert it into Acceleration vs time data using ifft function.’ Thet depends entirely on what the data are. If you...

Converting Frequency domain to time domain

‘How do I convert it into Acceleration vs time data using ifft function.’ Thet depends entirely on what the data are. If you...

6 Tage ago | 0

Answered

Trying to Plot feedback system

The image is a bit difficult to read. The error appears to be thrown with the step call. This may likely be due to your having...

Trying to Plot feedback system

The image is a bit difficult to read. The error appears to be thrown with the step call. This may likely be due to your having...

6 Tage ago | 0

Answered

raise power to power in title

Try this (using LaTeX): figure plot(rand(50,1), rand(50,1), 'p') axis([0 1 0 1]) title('$y = x \times e^{- \frac{x^2}{2...

raise power to power in title

Try this (using LaTeX): figure plot(rand(50,1), rand(50,1), 'p') axis([0 1 0 1]) title('$y = x \times e^{- \frac{x^2}{2...

6 Tage ago | 1

| accepted

Answered

Hi. I have problems with transfer function and Laplace

Control System Toolbox objects and Symbolic Math Toolbox objects are inherently incompatible. It takes a bit of effort to get t...

Hi. I have problems with transfer function and Laplace

Control System Toolbox objects and Symbolic Math Toolbox objects are inherently incompatible. It takes a bit of effort to get t...

7 Tage ago | 0

| accepted

Answered

finding rms of fundamental and thd using csv file

Use the Signal Processing Toolbox functions thd and rms. The Fourier transform plot illustrates the harmonics, so you can use...

finding rms of fundamental and thd using csv file

Use the Signal Processing Toolbox functions thd and rms. The Fourier transform plot illustrates the harmonics, so you can use...

7 Tage ago | 1

| accepted

Answered

Assigning value to a variable.

Put simply: x(1)=1; % ‘x’ is an array, with the first element assigned to ‘1’ y(1)=1; ...

Assigning value to a variable.

Put simply: x(1)=1; % ‘x’ is an array, with the first element assigned to ‘1’ y(1)=1; ...

7 Tage ago | 0

| accepted

Answered

How to correspond line colors with histogram

The FaceColor property of the bars is 'auto', so if you want the colors to be the same, it is necessary to define them: out = ...

How to correspond line colors with histogram

The FaceColor property of the bars is 'auto', so if you want the colors to be the same, it is necessary to define them: out = ...

7 Tage ago | 0

| accepted

Answered

Filtered signal plot not showing up

It’s necessary for you to understand the problem with your indexing. This: n = 200; k = 500:(n-1) produces: k = 1×0 ...

Filtered signal plot not showing up

It’s necessary for you to understand the problem with your indexing. This: n = 200; k = 500:(n-1) produces: k = 1×0 ...

7 Tage ago | 0

| accepted

Answered

Local Maximums of a plot

The islocalmax function could be helpful here. The Signal Processing Toolbox has findpeaks.

Local Maximums of a plot

The islocalmax function could be helpful here. The Signal Processing Toolbox has findpeaks.

7 Tage ago | 1

Answered

Plotting graph with only one point (x,y) and slope

A bit of algebra (courtesy of the Symbolic Math Toolbox to prevent stupid errors, that I will let you re-derive if you wish) mak...

Plotting graph with only one point (x,y) and slope

A bit of algebra (courtesy of the Symbolic Math Toolbox to prevent stupid errors, that I will let you re-derive if you wish) mak...

7 Tage ago | 0

Answered

How to graph this 'for' loop

Try something like this (with the correct variable values): T_inf = eps; % Not ...

How to graph this 'for' loop

Try something like this (with the correct variable values): T_inf = eps; % Not ...

7 Tage ago | 1

Answered

Vectorization and a strange result

Your ‘mytest.mat’ file contains: fx_1: [1×150 double] beta: [1×25 double] t: [1×150 double] con...

Vectorization and a strange result

Your ‘mytest.mat’ file contains: fx_1: [1×150 double] beta: [1×25 double] t: [1×150 double] con...

7 Tage ago | 1

Answered

changing y axes on a loglog graph

Add these linmes at the end of your posted code: ylim([1 1E+3]) ytk = yticks; yticklabels(ytk) so the full code is now: x...

changing y axes on a loglog graph

Add these linmes at the end of your posted code: ylim([1 1E+3]) ytk = yticks; yticklabels(ytk) so the full code is now: x...

8 Tage ago | 0