Risposto
Discretize State Space feedback controller using c2d()
Hi John, lqrd returns the gains for a discrete time controller. The Control System Toolbox cannot model hybrid systems, as far ...

oltre 3 anni fa | 1

| accettato

Risposto
Matlab function block and integration
If computing the instantaneous power as a function of time, why not feed that into an integerator to find the energy as a functi...

oltre 3 anni fa | 1

Risposto
How to create a sine function from simulink blocks?
Why not just use a Sine Wave block? Would be a lot easier, and you can specify the sample time. The plot you're getting is most...

oltre 3 anni fa | 0

| accettato

Risposto
Linearize and Transfer Function
Does linearize do what you need? It can be used to linearize a model or a specific block in a model. Not sure how well it works...

oltre 3 anni fa | 1

Risposto
remove annotations from diskmarginplot
Hi Muhammad, Something like this might work, either inside or after the loop. Some experimentation may be needed. Disk margin ...

oltre 3 anni fa | 0

| accettato

Risposto
How do I change variables so that I can differentiate with respect to a derivative?
Hi Curran, The doc page functionalDerivative has related example and shows the problem can be solved like this: % Symbols sy...

oltre 3 anni fa | 2

| accettato

Risposto
Normalizing an FFT Vector
Hi bil, Define psi syms x real L = 100; psi(x) = sqrt(sym(2)/L)*sin(sym(pi)*x/L)*rectangularPulse(0,L,x); %particle in a box...

oltre 3 anni fa | 1

| accettato

Risposto
Close loop bode plot
If you have a model of the plant and a model of the controller, it's likely that all that's needed is the feedback command to co...

oltre 3 anni fa | 0

Risposto
How does bandpower() round the input frequencies in variable 'freqrange'?
Hi Joey, bandpower is an .m file, at least in 2022a, so you can inspect the code. My reading is that it will compute the power...

oltre 3 anni fa | 0

| accettato

Risposto
Symbolic acos( cos(theta) ) does not return theta.
simplify does provide an option that returns theta: syms theta real assume( theta >-1 & theta < 1) a = simplify( acos(cos(the...

oltre 3 anni fa | 0

Risposto
I have a transfer function as shown, how do i introduce this block in simulink
Use a Tranport Delay block with Time Delay parameter of 0.2 in series with a Transfer Fcn with Numerator 1 and Denominator [0.1 ...

oltre 3 anni fa | 0

Risposto
I cannot match the calculated from formula FFT with the MATLAB answer though they should be the same
Hi Jonathan Let's define the input signal symbolically clear syms a x w real s1(x) = a*sech(a/sqrt(2)*x) Its Continous Time...

oltre 3 anni fa | 1

| accettato

Risposto
d2c adding additional states to LTI
Hi Bobby, d2c using either the zoh or foh methods has a constraint that the eigenvalues of the A matrix can't be on the negativ...

oltre 3 anni fa | 0

| accettato

Risposto
Using rlocus I am confused
Hi Madyson, If you want to draw the root locus for a specific range of gains, then only specify a single range at a time G = t...

oltre 3 anni fa | 0

Risposto
How can I get the parameters of a MATLAB Function programmatically on command line
For a specific Matlab Function block, as asked in the question (I have a simple Matlab Function block in my model with one input...

oltre 3 anni fa | 0

Risposto
Simulink State Space Error
Hi Dylan, Unclear why the error message refers to "Project1/Step" when the model apparently does not contain a Step block. Any...

oltre 3 anni fa | 1

| accettato

Risposto
IMU sensor fusion: imufilter command reduces number of samples
Hi Aishwarya, Because the decimation factor is 2, shoudn't it be expected that there be half as many output samples as there ar...

oltre 3 anni fa | 0

Risposto
Using a persistent array in a Simulink function block
Hi richard, The typical structure would look like this: function [a11, a12, a21, a22, b1, b2] = fcn(I_in, V_out, U_in) persis...

oltre 3 anni fa | 0

| accettato

Risposto
simple test for nufft not working
Hi Pieter, I don't think that expression for Y(k) is correct. We can check symbolically %% define signal t = sym([-1.0,1.0]);...

oltre 3 anni fa | 0

| accettato

Risposto
In kalman filter, the elements of state transition matrix using fourth-order runge-kutta integration
Hi Chong-You, It sounds like the system is linear and time invariant. In continuous time, the state dynamics are: xdot(t) = A...

oltre 3 anni fa | 0

Risposto
Using Bus in Simulink
Does Load Data using the From Workspace Block include an example that will help?

oltre 3 anni fa | 0

Risposto
Error using symfun/subsref (line 203) Invalid argument at position 2.
Hi Catalina, Need to subscript N in the foor loop to create a vector with 3 elements. Also, the final construction of N had an ...

oltre 3 anni fa | 0

Risposto
Convert cell array of string arrays to a single string array
Hi Charles Use vertcat with a comma separated list as the input my_cell = cell(5,1); % Assign some values my_cell{1} = "even...

oltre 3 anni fa | 0

| accettato

Risposto
Function writing in MATLAB in symbolic format
It appears that the symfun objects have to have the same arguments (number and order) to add them syms rho(x,y,z,t) rho_m(x,y,z...

oltre 3 anni fa | 0

Risposto
How to input exponentials in transfer functions using Simulink?
In addition to using a single transfer function along with gains and transport delays as suggested by @Sam Chak, if you have the...

oltre 3 anni fa | 0

Risposto
How to use a from workspace function for a 1D lookup table
Dose input_grafiek have a constant value over the entire simulation run? If it does, don't use a From Workspace block. Instead, ...

oltre 3 anni fa | 0

| accettato

Risposto
Get Intermediate Signal of Block Diagram for Control System
Hi Ian, AFACIT, you did everything correctly as far as defining and connecting the diagram. With the PID controller defined, th...

oltre 3 anni fa | 1

| accettato

Risposto
How can i remove (or hide) the time units ("(seconds)") from the stepplot graphic in the x-axis?
If you're willing to accept 'hours' in the label instead of 'horas' then set the TimeUnit property of M numM=[1.123]; denM=[1 ...

oltre 3 anni fa | 0

| accettato

Risposto
Binärsignal transformation 100 [Hz] --> 2000 [Hz]
Hi julius, Does repelem meet the requirement. Here's a small example to repeat each element three times (instead of 20) to mak...

oltre 3 anni fa | 0

Risposto
How to test if an object is a simulink.parameter ?
Hi Alexandre Use find on dictionary section object to find the entries that meet the desired criterion. >> myDictionaryObj = S...

oltre 3 anni fa | 1

| accettato

Carica altro