Community Profile # Paul

Last seen: Today Active since 2011

#### Statistics

All
• • • • • • • #### Content Feed

View by

Matlab transpositions from formula
Maybe you really mean to put all those fractional exponents inside parentheses? For example: Tck = 4; Tck.^3/2 % or Tck.^(3...

ungefär 6 timmar ago | 1

how to implement "2s+1" Tfcn in Simulink
Can't be done explicitly as you've found. Option 1: make the Tfcn (2*s + 1)/(c*s + 1) where c is small enough such that the out...

ungefär 6 timmar ago | 0

When putting a variety of values in one at a time to an equation it outputs the right answer, but when I put in an array of values the answers are wrong
If you want y to be evaluated for each element of x, you need to use the "element-wise" operator ./ (note the dot) instead of /...

ungefär 12 timmar ago | 0

| accepted

Integer eigenvalues in Matlab
Asusming that "a given (integer) matrix A" means that you know the values of the elements of A, then you can just use eig on the...

ungefär 15 timmar ago | 0

Need help getting my delta functions to work
The problem is that nfft = 150; 0:0:nfft-1 is empty. What that line is bascially asking for is a vector of number from 0 to...

ungefär 16 timmar ago | 0

How to plot several unit steps in a graph without doing it manually?
Are you looking for something like this? y2 = create_y_step(2) y4 = create_y_step(4) y8 = create_y_step(8) fplot([y2 y4 y8],...

ungefär 18 timmar ago | 0

| accepted

Assigning values for a variable and solving symbolic equations numerically
You can use subs() and double(), at least for the "easy" versions of d0: syms d0 t positive h = 10; % Height of the tank [m] ...

2 dagar ago | 0

| accepted

Issue with simulating linear system using lsim inside a for loop
Each step in ReferenceModel has to use an intiial state that is the final state from the previous step. Using that term y0 is in...

2 dagar ago | 0

| accepted

Question

Why is a Question Closed?

3 dagar ago | 0 answers | 0

### 0

Is there a way to programmatically get list of valid values/datatypes for Simulink block parameter?
I'm not sure that this can be done in general. But for dialog parameters that areof type 'enum', the options can be obtained by:...

3 dagar ago | 0

Mismatch between the frequency response of a transfer function and bode plot
Couldn't run the code becase sigma_d (and possibly other variables) were not defined. Can you clarify what this code snippet is...

3 dagar ago | 0

| accepted

Question

Why Do Some Figure Properties Not Seem to be Applied Properly when Copy/Paste to/from Clipboard?
I have two figures f1 and f2. f1 is created with bar() and f2 with histogram2(). For f1 I execute set(f1,'Color','none') set...

5 dagar ago | 0 answers | 0

### 0

plot the probability distribution from Schrodinger Equation
scatter3() is used to plot points in 3D space. But f is really a function of three variables, so you'll need an alternative to v...

5 dagar ago | 0

Need help with discrete time SS controllability & phase portrait
Do you have a source for the equations you're trying to implement to solve for u? I thought that the controllability Grammian a...

7 dagar ago | 0

| accepted

Determine the output of the given Block diagram
Not clear how that Matlab code would mimic the by-hand solution without seeing the by-hand solution. But I really doubt that it ...

7 dagar ago | 0

| accepted

Complex representation of eigenvalues of a symbolic 2x2 matrix
Is the expected result obtained only when a is real? syms a A = [0, 1; -1, 2*cos(a)]; lambda = rewrite(simplify(eig(A),1...

7 dagar ago | 0

Wrong phase plot generated by angle()
The four-quadrant arctangent is needed to find the angle of a (non-zero) complex number: syms w real X(w) = 1/(1 + 1j*w)^2; p...

8 dagar ago | 0

How do I find out what type of block a Simulink block is?
Right click on the block. In the menu that pop-up menu, the identifier within the parentheses next to Block Parameters is the ty...

8 dagar ago | 0

| accepted

I need to find the values of K and a of system 1 that yields 15% overshoot and 𝐾𝑣=500 but I cant get pass this error. Please help
Need * for mulitpliation in the denominator: syms s K a g(s) = K/(s*(s+a))

9 dagar ago | 0

| accepted

How to Filter a Commanded Position to have Velocity and Acceleration Limits in Simulink
I'm not sure that it's feasible to meet all of the stated requirements, particularly "If the signal is not saturated, [it should...

10 dagar ago | 0

| accepted

hey. I keep getting an error for this code. If anyone could help me it would be greatly appreciated.
Should num also use poly2sym? Otherwise, gs is 1 x 2 transfer function matrix, which may be what you want, but maybe not. If y...

10 dagar ago | 1

ilaplace gives time limited result
Sometimse fplot() gets confused. Does regular plot() show the expected result? syms s syms t real A = 20e3; B = 10e3; C= 4...

10 dagar ago | 0

| accepted

Why Matlab do not respect the exponential matrix property \exp^{YXY^{-1}}=Y\exp^XY^{-1}?
The identity holds for the matrix exponential, which is implemented with expm(), not exp() (which is the element-wise exponentia...

10 dagar ago | 1

| accepted

Simulink - saw tooth signal minimum counter
Assuming that your signal has sharp corners .... One approach may be to: Input the signal into a Detect Increase block. The out...

11 dagar ago | 0

| accepted

Transform or eliminate states of mechss object
Even garden variety ss objects can't have the system matrices changed one by one sys = rss(4,2,2) % model with four states, tw...

11 dagar ago | 0

| accepted

Initializing parameters from an mfile function to a simulink file
If I understand your workflow correclty, it looks something like this: function simout = myfunction(inputarg) simparam1 = 5*...

11 dagar ago | 0

How to delay a loop in a function block?
I tried this in 2019a and it worked exactly as expected. The effect of the pause(1) is to make this (simple) simulation take 12 ...

11 dagar ago | 0

Question

What's the Best Way to Symbolically Define the Periodic Extension of a Finite Duration Signal?
Suppose I have a finite duration signal: syms s(t) s(t) = triangularPulse(0,1,1.5,t); fplot(s(t)) Now I want to define the p...

19 dagar ago | 0 answers | 0