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...

15 days ago | 0 answers | 0

Answered

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...

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...

16 days ago | 0

Answered

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...

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...

17 days ago | 0

| accepted

Answered

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 ...

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 ...

17 days ago | 0

| accepted

Answered

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...

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...

17 days ago | 0

Answered

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...

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...

18 days ago | 0

Answered

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...

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...

19 days ago | 0

| accepted

Answered

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))

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))

20 days ago | 0

| accepted

Answered

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...

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...

20 days ago | 0

| accepted

Answered

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...

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...

20 days ago | 1

Answered

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...

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...

21 days ago | 0

| accepted

Answered

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...

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...

21 days ago | 1

| accepted

Answered

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...

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...

21 days ago | 0

| accepted

Answered

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...

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...

22 days ago | 0

| accepted

Answered

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*...

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*...

22 days ago | 0

Answered

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 ...

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 ...

22 days 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...

29 days ago | 1 answer | 0

Answered

ODE45 producing NaN values for a set of differential equations

One problem appears to be that the initial condition of x(5) is 0, which results in a divide by zero in the computation of theta...

ODE45 producing NaN values for a set of differential equations

One problem appears to be that the initial condition of x(5) is 0, which results in a divide by zero in the computation of theta...

1 month ago | 1

Answered

Unique Block Parameters for Multiple Instances of the Same Referenced Subsystem or Custom Library Subsystem?

Parameterize Instances of a Reusable Referenced Model might be useful doc page, if I understand the question correctily.

Unique Block Parameters for Multiple Instances of the Same Referenced Subsystem or Custom Library Subsystem?

Parameterize Instances of a Reusable Referenced Model might be useful doc page, if I understand the question correctily.

1 month ago | 0

| accepted

Answered

Calculate the complementary bivariate normal.

I think you can use mvncdf as: Cb = mvndcf([alpha alpha],[inf inf],[0 0],[1 rho;rho 1])

Calculate the complementary bivariate normal.

I think you can use mvncdf as: Cb = mvndcf([alpha alpha],[inf inf],[0 0],[1 rho;rho 1])

1 month ago | 0

Answered

In 3 axis gyroscope the output (Wmeas) contains error or the output is without error?

Are you asking about a speciic gyro model provided in Matlab or is this a general question? In either case, the input to the th...

In 3 axis gyroscope the output (Wmeas) contains error or the output is without error?

Are you asking about a speciic gyro model provided in Matlab or is this a general question? In either case, the input to the th...

1 month ago | 0

| accepted

Answered

How to write piecewise function in symbolic form?

Use &, not && syms x(t) x(t) = piecewise(-2 < t & t <= -1 , t+2, -1 < t & t <= 1, 1, 1 < t & t <= 2, -t+2, 0) fplot(x(t),'-o...

How to write piecewise function in symbolic form?

Use &, not && syms x(t) x(t) = piecewise(-2 < t & t <= -1 , t+2, -1 < t & t <= 1, 1, 1 < t & t <= 2, -t+2, 0) fplot(x(t),'-o...

1 month ago | 0

Answered

fft tool - amplitude dependence vs. frequency

For pure sinusoidal signals, the "expected" result is only obtained when the length, N, of the FFT satisfies N = M*Fs/F1 where...

fft tool - amplitude dependence vs. frequency

For pure sinusoidal signals, the "expected" result is only obtained when the length, N, of the FFT satisfies N = M*Fs/F1 where...

1 month ago | 0

| accepted

Answered

How to use a matrix of 12*12 to form a matrix of 96*96?

It's too bad we can't do something like this: B = [1 2;3 4]; repeats = 2; % use a smaller example % R = blkdiag(repmat({B},1,r...

How to use a matrix of 12*12 to form a matrix of 96*96?

It's too bad we can't do something like this: B = [1 2;3 4]; repeats = 2; % use a smaller example % R = blkdiag(repmat({B},1,r...

1 month ago | 1

Answered

Simulink continue simulation from last timestep

Unclear why Matlab Function blocks would slow anything down, at least not as a general rule. Save and Restore operating points ...

Simulink continue simulation from last timestep

Unclear why Matlab Function blocks would slow anything down, at least not as a general rule. Save and Restore operating points ...

1 month ago | 1

| accepted

Answered

Is there a way to input an array from the workspace into a Simulink model chunk by chunk/per simulation step?

Can you use a From Workspace block? Use your 20 x 3 array and uncheck the box for Interpolate Data.

Is there a way to input an array from the workspace into a Simulink model chunk by chunk/per simulation step?

Can you use a From Workspace block? Use your 20 x 3 array and uncheck the box for Interpolate Data.

1 month ago | 0

Answered

Can someone help me implement my Heaviside function into my Kuramoto model please?

The function H seems to do the opposite of what you want it do, i.e., it's zero over the desired range and one outside that rang...

Can someone help me implement my Heaviside function into my Kuramoto model please?

The function H seems to do the opposite of what you want it do, i.e., it's zero over the desired range and one outside that rang...

1 month ago | 0

Answered

how to plot the result of convolution? ; used conv()

I assume you meant x(t) = sin(pi*t) (not sin(pi*x)). Let's rewrite: x(t) = sin(2 * pi / 2 * t). So x(t) has period T = 2 as ...

how to plot the result of convolution? ; used conv()

I assume you meant x(t) = sin(pi*t) (not sin(pi*x)). Let's rewrite: x(t) = sin(2 * pi / 2 * t). So x(t) has period T = 2 as ...

1 month ago | 0

Answered

designfilt and get the numerator and denominator coefficients of my filter

Trying to convert such a high order filter to a tf representation is likely not going to work well. Maybe consider implementing ...

designfilt and get the numerator and denominator coefficients of my filter

Trying to convert such a high order filter to a tf representation is likely not going to work well. Maybe consider implementing ...

1 month ago | 1

Answered

pulse train with gaussian pulses in an irregular interval

Can't the d input to pulstran be set to whatever offsets you want, random or otherwise? Taking the example from the pulstran do...

pulse train with gaussian pulses in an irregular interval

Can't the d input to pulstran be set to whatever offsets you want, random or otherwise? Taking the example from the pulstran do...

1 month ago | 0