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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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