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)

7 días 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...

7 días 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...

7 días 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...

7 días 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:...

7 días 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); ...

7 días 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...

7 días 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...

7 días 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...

7 días 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; ...

7 días 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...

7 días 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...

7 días 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 ...

7 días 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)) ...

8 días 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...

8 días 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) ...

9 días 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...

9 días 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...

9 días 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...

10 días 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...

10 días 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) ...

10 días 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 ...

11 días 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, ...

11 días 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 = ...

11 días 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.

11 días 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]);

11 días ago | 0

| accepted

Answered

Bin data into equally spaced intervals

Try this: D = load('matlab.mat'); A91 = D.A91; [Ux,~,ix] = uniquetol(A91(:,1), 5E-7); [Uy,~,iy] = uniquetol(A91(:,2), 5E-...

Bin data into equally spaced intervals

Try this: D = load('matlab.mat'); A91 = D.A91; [Ux,~,ix] = uniquetol(A91(:,1), 5E-7); [Uy,~,iy] = uniquetol(A91(:,2), 5E-...

12 días ago | 1

| accepted

Answered

Multiple selection of an array

Using a simple loop: Array = rand(150000,1); % Create Array v = [1100 : 1460 : numel(Array)...

Multiple selection of an array

Using a simple loop: Array = rand(150000,1); % Create Array v = [1100 : 1460 : numel(Array)...

12 días ago | 1

Answered

How can I shade confidence intervals on a loglog plot?

Try this: x = linspace(0.1, 10, 100); % Create Data y = sin(2*pi*x/5)+1.5; ...

How can I shade confidence intervals on a loglog plot?

Try this: x = linspace(0.1, 10, 100); % Create Data y = sin(2*pi*x/5)+1.5; ...

12 días ago | 0

Answered

Undefined operator '-' for input arguments of type 'function_handle'.

You have to evaluate a function if you want to use it in a computation. For example — Xn=(CI-funci)/derivada; would work. ...

Undefined operator '-' for input arguments of type 'function_handle'.

You have to evaluate a function if you want to use it in a computation. For example — Xn=(CI-funci)/derivada; would work. ...

12 días ago | 0