Answered

fft of Rectangle*sin function in MATLAB

It appears that you want to find the Continuous Time Fourier Transform of a windowed cos wave, where the window covers an intege...

fft of Rectangle*sin function in MATLAB

It appears that you want to find the Continuous Time Fourier Transform of a windowed cos wave, where the window covers an intege...

2 months ago | 0

| accepted

Answered

Error when using find function

Maybe you want to start with ismember? doc ismember

Error when using find function

Maybe you want to start with ismember? doc ismember

2 months ago | 0

Answered

how to use ss and lsim for 1 dof differential equation

That lsim command calculates y using default initial conditions x(0) = xdot(0) = 0, but the analytical solution clearly doesn'...

how to use ss and lsim for 1 dof differential equation

That lsim command calculates y using default initial conditions x(0) = xdot(0) = 0, but the analytical solution clearly doesn'...

2 months ago | 0

| accepted

Question

Given One Partition of a Matrix, What is the Best Way to Find a Second Partition that Ensures the Matrix is Nonsingular?

Suppose I have a matrix C, dimension m x n, m < n, and that rank(C) = m. I wish to find a marix V, dimension n-m x n, such that...

2 months ago | 3 answers | 0

Answered

Lsim gives NaN for square input

Look at the eigenvalues of the plant matrix: >> eig(sys) ans = -6.846331220081878e+07 -5.237359879589575e+07 ...

Lsim gives NaN for square input

Look at the eigenvalues of the plant matrix: >> eig(sys) ans = -6.846331220081878e+07 -5.237359879589575e+07 ...

2 months ago | 0

| accepted

Answered

Invalid use of operator in for loop

You're geting the error because that's the wrong syntax for a for loop: doc for Having said that, it kind of looks like you re...

Invalid use of operator in for loop

You're geting the error because that's the wrong syntax for a for loop: doc for Having said that, it kind of looks like you re...

2 months ago | 1

Answered

How do I find the LTI system using deconv, when it is connected to more systems and with the final impulse response?

I think heaviside is function from the Symbolic Math Toolbox, but I don't see any symbolic variables defined. In any case, perha...

How do I find the LTI system using deconv, when it is connected to more systems and with the final impulse response?

I think heaviside is function from the Symbolic Math Toolbox, but I don't see any symbolic variables defined. In any case, perha...

2 months ago | 0

Answered

Simulink Difference Equation Implementation

Maybe this example will help, which essentially illustrates the comment made by Alvery. Consider a plant P(s) = 1/(s + 5) that ...

Simulink Difference Equation Implementation

Maybe this example will help, which essentially illustrates the comment made by Alvery. Consider a plant P(s) = 1/(s + 5) that ...

2 months ago | 0

| accepted

Answered

Simulink with control system designer: Step response is completely flat.

The block diagram has an Open-loop Input at the input to the plant (on the line marked "u + d") so the response from any input t...

Simulink with control system designer: Step response is completely flat.

The block diagram has an Open-loop Input at the input to the plant (on the line marked "u + d") so the response from any input t...

2 months ago | 1

| accepted

Answered

How to chose one form of transfer function from other forms

You don't need to get the num and den explicitly using tfdata (unless you need them for some reason). To convert from ss to tf: ...

How to chose one form of transfer function from other forms

You don't need to get the num and den explicitly using tfdata (unless you need them for some reason). To convert from ss to tf: ...

2 months ago | 1

Answered

Error using acker System must be single input.How can I solve this problem ?

Try using the place command: doc place

Error using acker System must be single input.How can I solve this problem ?

Try using the place command: doc place

2 months ago | 0

Question

Why is extractFileText Much Slower than fileread for Text Files?

I'm fine with using fileread, but am curious why extractFileText is so much slower: >> tic,for i=1:500,s1=extractFileText('sonn...

2 months ago | 1 answer | 0

Answered

Can I do this using matlab or simulink?

It looks like the Simulink model is that of a linear time invariant (LTI) system. If that is the case one can use linmod to get ...

Can I do this using matlab or simulink?

It looks like the Simulink model is that of a linear time invariant (LTI) system. If that is the case one can use linmod to get ...

2 months ago | 0

Answered

Rearrange state space system

Let's assume that the state space model from Simulink is defined as: xdot = A*x + B*u [y1;y2] = [C1; C2] * x + [0;D2] u where...

Rearrange state space system

Let's assume that the state space model from Simulink is defined as: xdot = A*x + B*u [y1;y2] = [C1; C2] * x + [0;D2] u where...

2 months ago | 0

| accepted

Answered

Why can't I get the same plot as the official tutorial video? (non-minimal phase system)

I get the same Bode plots. What's different about yours? Also, you can do this with one Bode command bode(G,G_RHP_zero,G_delay...

Why can't I get the same plot as the official tutorial video? (non-minimal phase system)

I get the same Bode plots. What's different about yours? Also, you can do this with one Bode command bode(G,G_RHP_zero,G_delay...

3 months ago | 1

| accepted

Answered

Using Lsim to solve a dynamic control model.

It sounds like wf1 and wf2 are supposed to be step inputs at t = 1 and t = 5. In Simulink these were implemented with Step block...

Using Lsim to solve a dynamic control model.

It sounds like wf1 and wf2 are supposed to be step inputs at t = 1 and t = 5. In Simulink these were implemented with Step block...

3 months ago | 0

Answered

Accurate rise time with stepinfo()

The first input to stepinfo is incorrect. It should just be g >> S = stepinfo(g,'RiseTimeLimits',[0 0.632]) S = struc...

Accurate rise time with stepinfo()

The first input to stepinfo is incorrect. It should just be g >> S = stepinfo(g,'RiseTimeLimits',[0 0.632]) S = struc...

3 months ago | 0

Answered

How to input a vector in Simulink with initial values to ultimately plot it over time?

Define x0 and A in the matlab workspace. Here is the block diagram. Make sure to select matrix multiply for the gain blocks. De...

How to input a vector in Simulink with initial values to ultimately plot it over time?

Define x0 and A in the matlab workspace. Here is the block diagram. Make sure to select matrix multiply for the gain blocks. De...

3 months ago | 0

| accepted

Answered

Is there a way to reset after a given time the initial condition of an integrator block in simulink?

If you haven't already, check out section Resetting the State on the Integrator block doc page.

Is there a way to reset after a given time the initial condition of an integrator block in simulink?

If you haven't already, check out section Resetting the State on the Integrator block doc page.

3 months ago | 0

Answered

Plotting control closed loop input

The direct answer to your question is this line: >> u = -K.*ycl2 + F.*r; Matrix dimensions must agree. >> size( -K.*ycl2) ...

Plotting control closed loop input

The direct answer to your question is this line: >> u = -K.*ycl2 + F.*r; Matrix dimensions must agree. >> size( -K.*ycl2) ...

3 months ago | 0

Question

How Do I Delete a Linear Analysis Point from a Block Diagram?

I have a Simulink block diagram and on one of the signal lines I set a linear analysis point: right click -> Linear Analysis Poi...

3 months ago | 1 answer | 0

Answered

program block diagram in matlab, not simulink

Look at doc connect and see if that helps.

program block diagram in matlab, not simulink

Look at doc connect and see if that helps.

3 months ago | 0

| accepted

Answered

Estimating a second order transfer function for a over damped second order system.

I haven't yet tried this myself, but in the System Identification Toolbox idproc looks like it will allow you to specify a secon...

Estimating a second order transfer function for a over damped second order system.

I haven't yet tried this myself, but in the System Identification Toolbox idproc looks like it will allow you to specify a secon...

3 months ago | 0

Answered

Amortization Schedule Function - wrong result?

Your solution will always yield the same result regardless of the what the user inputs to your function for loanAmount, loanTerm...

Amortization Schedule Function - wrong result?

Your solution will always yield the same result regardless of the what the user inputs to your function for loanAmount, loanTerm...

3 months ago | 1

| accepted

Answered

Varying results for the same model

If you are using a variable step solver, including HRSG and ST can cause the outputs of GT1 and GT2 to change if HRSG and/or ST ...

Varying results for the same model

If you are using a variable step solver, including HRSG and ST can cause the outputs of GT1 and GT2 to change if HRSG and/or ST ...

3 months ago | 0

Answered

State space models are same?

This is actually not a trivial question. Two state space models sys1 = ss(A1,B1,C1,D1) and sys2 = ss(A2,B2,C2,D2) will have the ...

State space models are same?

This is actually not a trivial question. Two state space models sys1 = ss(A1,B1,C1,D1) and sys2 = ss(A2,B2,C2,D2) will have the ...

3 months ago | 0

Answered

Solving a linear system equations with variables on both sides

Similar problem discussed here

Solving a linear system equations with variables on both sides

Similar problem discussed here

3 months ago | 0

Answered

Matlab Overall Transfer Function script based on Simulink Block Diagram.

It would be much easier to see what you did if you posted your code instead of an image of your code. Looking at your derivatio...

Matlab Overall Transfer Function script based on Simulink Block Diagram.

It would be much easier to see what you did if you posted your code instead of an image of your code. Looking at your derivatio...

3 months ago | 0

| accepted

Question

What Does "Enable decoupled continuous integration" Mean?

"Enable decoupled continuous integration" is an option in the Simulink Solver pane. Can anyone explain what setting the paramet...

3 months ago | 0 answers | 0

Answered

Issue in a Simulink simulation.

Not sure what's going on, but the fact that the port names for the Car Dynamics block are capitalized but are are lower case in ...

Issue in a Simulink simulation.

Not sure what's going on, but the fact that the port names for the Car Dynamics block are capitalized but are are lower case in ...

3 months ago | 0