Answered

Equations of 3d Curves

If you want to differentiate them using the Symbolic Math Toolbox, start with: syms t x(t) = 5*t*sin(4*t) y(t) = 12*t + 200...

Equations of 3d Curves

If you want to differentiate them using the Symbolic Math Toolbox, start with: syms t x(t) = 5*t*sin(4*t) y(t) = 12*t + 200...

11 days ago | 0

Answered

Why won't my x-axis tick label format change?

Add these two lines to your code: xt_sigfig = round(xt, 3, 'significant'); ax.XTickLabel = xt_sigfig; so the complet...

Why won't my x-axis tick label format change?

Add these two lines to your code: xt_sigfig = round(xt, 3, 'significant'); ax.XTickLabel = xt_sigfig; so the complet...

11 days ago | 0

| accepted

Answered

how characters connected in quotes

See the char documentation for information on character arrays, and string for information on string arrays. Those should pro...

how characters connected in quotes

See the char documentation for information on character arrays, and string for information on string arrays. Those should pro...

11 days ago | 0

| accepted

Answered

Split every current signal into N segments of Length L

Assuming I understand waht you want to do, I would use the Signal Processing Toolbox buffer function to do that. You would ha...

Split every current signal into N segments of Length L

Assuming I understand waht you want to do, I would use the Signal Processing Toolbox buffer function to do that. You would ha...

12 days ago | 0

| accepted

Answered

problem in z transform

Use the simplify function: ZT = simplify(ZT, 'Steps',500); to get: ZT = 2/(z - 2)

problem in z transform

Use the simplify function: ZT = simplify(ZT, 'Steps',500); to get: ZT = 2/(z - 2)

12 days ago | 0

| accepted

Answered

How to use fzero to solve for a variable in an exponent?

Take the fzero call out of the function it calls: X1 = 0.5; X2 = 0.5; A12 = 1.6798; A21 = 0.9227; AW = 7.96681; BW = 1668...

How to use fzero to solve for a variable in an exponent?

Take the fzero call out of the function it calls: X1 = 0.5; X2 = 0.5; A12 = 1.6798; A21 = 0.9227; AW = 7.96681; BW = 1668...

12 days ago | 0

Answered

Assigning Input String To Meet Criteria

The logical equality does not work with character arrays. Use strcmp or (strcmpi) instead: gender = 'boy'; TestLogic = str...

Assigning Input String To Meet Criteria

The logical equality does not work with character arrays. Use strcmp or (strcmpi) instead: gender = 'boy'; TestLogic = str...

12 days ago | 1

| accepted

Answered

Using indexing to find specific rows

There are a number of ways to read your file. With respect to the rounding, that is only in the display. MATLAB maintains full...

Using indexing to find specific rows

There are a number of ways to read your file. With respect to the rounding, that is only in the display. MATLAB maintains full...

12 days ago | 0

| accepted

Answered

how make multiple cut or crop of time series

We do not know the dimensions of ‘Speed’. Assuming it is a vector, to concatenate the indices, enclose them in square brackets:...

how make multiple cut or crop of time series

We do not know the dimensions of ‘Speed’. Assuming it is a vector, to concatenate the indices, enclose them in square brackets:...

12 days ago | 0

| accepted

Answered

How to find all rows and columns that contain a specific value in MATLAB

Try this: A = randi([0 1], 10, 5); % Create Array 'A' A([4 8],:) = zeros(2,5); ...

How to find all rows and columns that contain a specific value in MATLAB

Try this: A = randi([0 1], 10, 5); % Create Array 'A' A([4 8],:) = zeros(2,5); ...

12 days ago | 0

| accepted

Answered

How to plot an equation at a certain variable value?

One approach: Vmax=5; %Given% K =20; %Given% S=0:1:100; %Range of values from 0 to 100 at increments of 1% h = [1 2 10]; f...

How to plot an equation at a certain variable value?

One approach: Vmax=5; %Given% K =20; %Given% S=0:1:100; %Range of values from 0 to 100 at increments of 1% h = [1 2 10]; f...

12 days ago | 1

| accepted

Answered

how can I save multiple files

Tell save exactly what you want it to save. See the documentation section on: Save Specific Variables to MAT-File for details...

how can I save multiple files

Tell save exactly what you want it to save. See the documentation section on: Save Specific Variables to MAT-File for details...

12 days ago | 0

Answered

Why doesn't my code recognize my function outputs

Yopu code does not specifically ask for that variable. Try this instead: for J=1:4 [survivalProb, avgSurvival] = testS...

Why doesn't my code recognize my function outputs

Yopu code does not specifically ask for that variable. Try this instead: for J=1:4 [survivalProb, avgSurvival] = testS...

12 days ago | 0

Answered

How can I do the same calculation multiple times for specified values of a variable

Thios does the same as yoiur code, using a loop, and a simplified plot call: x = 0:1:100; Co = 22; t1 = 30000; t2 = 60000; ...

How can I do the same calculation multiple times for specified values of a variable

Thios does the same as yoiur code, using a loop, and a simplified plot call: x = 0:1:100; Co = 22; t1 = 30000; t2 = 60000; ...

12 days ago | 0

| accepted

Answered

How to solve a system of integral equations?

It is probably best to use the more robust fsolve in the function instead of fzero. Try this: function S = Integralsystem(x...

How to solve a system of integral equations?

It is probably best to use the more robust fsolve in the function instead of fzero. Try this: function S = Integralsystem(x...

12 days ago | 0

Answered

2D plot with 3 axis and 3 column data

I have no idea which column is which curve. Try this: [D,T,R] = xlsread('Kitap3.xlsx'); Q1 = D(1:15,:); time = linspace...

2D plot with 3 axis and 3 column data

I have no idea which column is which curve. Try this: [D,T,R] = xlsread('Kitap3.xlsx'); Q1 = D(1:15,:); time = linspace...

12 days ago | 1

| accepted

Answered

How can I seperate these number from a cell and put it into a matrix.

Try this: [num,txt,raw] = xlsread('2019_nC0v_20200121_20200126_cleaned.xlsx'); vars = regexp(txt(1,:), ',', 'split'); varsc ...

How can I seperate these number from a cell and put it into a matrix.

Try this: [num,txt,raw] = xlsread('2019_nC0v_20200121_20200126_cleaned.xlsx'); vars = regexp(txt(1,:), ',', 'split'); varsc ...

12 days ago | 1

| accepted

Answered

I want to plot spectogram for my audio signal. What steps i have to follow for that.

Choose one column (channel) from ‘s’, then call the spectrogram function. Example — spectrogram(s(:,1)) ...

I want to plot spectogram for my audio signal. What steps i have to follow for that.

Choose one column (channel) from ‘s’, then call the spectrogram function. Example — spectrogram(s(:,1)) ...

13 days ago | 0

Answered

Estimating Models Using Frequency-Domain Data

Do not use dB. If you are starting with the idfrd function, note that the documentation states: The 'ResponseData' p...

Estimating Models Using Frequency-Domain Data

Do not use dB. If you are starting with the idfrd function, note that the documentation states: The 'ResponseData' p...

13 days ago | 0

Answered

How can I convert number to time?

If you have R2015b or later, this is straightforward: v = 1:58232; tsec = seconds(v/10); Show = tsec(1:18) ...

How can I convert number to time?

If you have R2015b or later, this is straightforward: v = 1:58232; tsec = seconds(v/10); Show = tsec(1:18) ...

14 days ago | 0

Answered

Issue with 3d plots

Use the view function to change the axes orientation with respect to the ‘camera’. If the mesh or surf exists in 3D., that shou...

Issue with 3d plots

Use the view function to change the axes orientation with respect to the ‘camera’. If the mesh or surf exists in 3D., that shou...

14 days ago | 0

Answered

Solving an equation in Matlab

These have analytic solutions: syms u(t) v(t) f taux tauy Hm rho R u0 v0 du = diff(u); dv = diff(v); DE = [du - f*v == ta...

Solving an equation in Matlab

These have analytic solutions: syms u(t) v(t) f taux tauy Hm rho R u0 v0 du = diff(u); dv = diff(v); DE = [du - f*v == ta...

14 days ago | 0

| accepted

Answered

How would I determine multiple maximums of loaded data from an experiment?

If you have the Signal Proicessing Toolbox, use the findpeaks function. An alternative is the islocalmax function (R2017b and...

How would I determine multiple maximums of loaded data from an experiment?

If you have the Signal Proicessing Toolbox, use the findpeaks function. An alternative is the islocalmax function (R2017b and...

15 days ago | 0

Answered

How to solve an equation with 2 variables where one variable is inputed?

Try this: BallRange = @(r,x) r.*sin(2*x) + 0.7*(cos(x).^2) - 0.176275*r.^2; r = input('Range of the target ') angle = fsolve...

How to solve an equation with 2 variables where one variable is inputed?

Try this: BallRange = @(r,x) r.*sin(2*x) + 0.7*(cos(x).^2) - 0.176275*r.^2; r = input('Range of the target ') angle = fsolve...

15 days ago | 0

| accepted

Answered

Multiple values of x what will be code

Try this: A=5; B=6; X = [4,9,56,33]; Y=(A+B)./X; figure plot (X,Y) Use element-wise operations (the (.) operator) ...

Multiple values of x what will be code

Try this: A=5; B=6; X = [4,9,56,33]; Y=(A+B)./X; figure plot (X,Y) Use element-wise operations (the (.) operator) ...

15 days ago | 0

| accepted

Answered

How do I find the the zero state diretion and the zero input direction of a transfer matrix in Matlab?

I have not done anything with Rosenbrock System Matrices since my multivariable control course in graduate school. We used the ...

How do I find the the zero state diretion and the zero input direction of a transfer matrix in Matlab?

I have not done anything with Rosenbrock System Matrices since my multivariable control course in graduate school. We used the ...

16 days ago | 0

| accepted

Answered

Why won't my plot appear on the graph?

It can, however since you are plotting points rather than lines, you must use a marker. Change the plot call to: plot (t1, ...

Why won't my plot appear on the graph?

It can, however since you are plotting points rather than lines, you must use a marker. Change the plot call to: plot (t1, ...

16 days ago | 0

| accepted

Answered

How can I obtain the matrices A, B, C ,D of the state space for a transfer matrix using Matlab?

Try this: s = tf('s'); P = [2/(s^2+3*s+2) 2*s/(s^2+3*s+2); -2*s/(s^2+3*s+2) -2/(s^2+3*s+2)] S = ss(P) producing: S = ...

How can I obtain the matrices A, B, C ,D of the state space for a transfer matrix using Matlab?

Try this: s = tf('s'); P = [2/(s^2+3*s+2) 2*s/(s^2+3*s+2); -2*s/(s^2+3*s+2) -2/(s^2+3*s+2)] S = ss(P) producing: S = ...

16 days ago | 0

| accepted

Answered

How to use findpeaks to find the maximum for a stimulus that contains multiple events?

I would first use findchangepts (R2016a and later) to segment the signal, then use findpeaks on each segment.

How to use findpeaks to find the maximum for a stimulus that contains multiple events?

I would first use findchangepts (R2016a and later) to segment the signal, then use findpeaks on each segment.

16 days ago | 1

| accepted

Answered

Split the data into group then graph them

If you have R2015a or later, the discretize funciton may do what you want: group = discretize(R, [0 10 20 30]);

Split the data into group then graph them

If you have R2015a or later, the discretize funciton may do what you want: group = discretize(R, [0 10 20 30]);

17 days ago | 0

| accepted