A répondu
I get Error: Invalid expression. Check for missing or extra characters. when commenting out lines in a multi-line statement
Here is one solution but it's hardly very convenient and contrary to commenting-out in other languages: y = ... 1 + ... ...%2...

plus de 3 ans il y a | 0

Question


I get Error: Invalid expression. Check for missing or extra characters. when commenting out lines in a multi-line statement
It seems you can't comment-out entire lines in MATLAB within a multi-line statement. Or am I doing it wrong. A few examples be...

plus de 3 ans il y a | 2 réponses | 0

2

réponses

A répondu
How to implement an RST controller in Simulink?
After some further diagnosis, I think I have solved the problem. The default setting of the Discrete-Time Integrator block is '...

plus de 3 ans il y a | 0

Question


How to implement an RST controller in Simulink?
Every time I search for help on this I am taken to the following page: RST Controller But I don't have access to the Simscape ...

plus de 3 ans il y a | 1 réponse | 0

1

réponse

A répondu
How to simulate a discrete linear system model with a user-specified disturbance signal?
I found the answer in the documentation: opt = simOptions('AddNoise',true,'NoiseData',e); Turns out I was looking at the wrong...

plus de 3 ans il y a | 0

| A accepté

Question


How to simulate a discrete linear system model with a user-specified disturbance signal?
I'm using idpoly and sim to simulate a discrete linear system so I can compare the output with my own (hand-coded) simulation. ...

plus de 3 ans il y a | 1 réponse | 0

1

réponse

A répondu
Raise a scalar to a descending series of powers in an array
Here is the correct answer I think. Element-wise operation: 0.8.^(3:-1:1)

plus de 3 ans il y a | 0

| A accepté

A répondu
Raise a scalar to a descending series of powers in an array
I found this solution: power(0.8,3:-1:1) ans = 0.5120 0.6400 0.8000 But still surprised if it can't be done ...

plus de 3 ans il y a | 0

Question


Raise a scalar to a descending series of powers in an array
I'm trying to compute a series of powers of a scalar. This seems to work but the result is not what I expected: 0.8^1:3 ans...

plus de 3 ans il y a | 3 réponses | 0

3

réponses

A répondu
How to check if two transfer functions are the same?
There is an answer on Stackoverflow: However, it does not work directly in my case: isequal(tf(C1), Gc1) ans = logical...

plus de 3 ans il y a | 0

Question


How to check if two transfer functions are the same?
I want to verify that two transfer functions are equal. For example: Kc = 0.4262; Ti=1.35; C1 = pidstd(Kc,Ti); tf(C1) s = t...

plus de 3 ans il y a | 3 réponses | 0

3

réponses

Question


Solve equation that has a complex subexpression
I want to solve the following equation for omega: where So I tried this: syms s omega G(s) G(s) = 10/(s*(1+s)*(1+0.2*s))...

plus de 3 ans il y a | 2 réponses | 0

2

réponses

Question


How to assign values to an array with broadcasting
Is there any way to do broadcasting while assigning values to an array? I know how to broadcast a computation: G = zeros(3) G...

plus de 3 ans il y a | 1 réponse | 0

1

réponse

A répondu
Undefined function 'workspacefunc' — How to change search path back after accidentally changing it
In the end I simply force-quitted MATLAB and restarted it and it works as normal again. (Remember to save your work first).

presque 4 ans il y a | 0

| A accepté

Question


Undefined function 'workspacefunc' — How to change search path back after accidentally changing it
I couldn't remember the function to check if a directory exists so I typed the following, and then accepted the suggested correc...

presque 4 ans il y a | 2 réponses | 0

2

réponses

Question


How can I determine the order of a symbolic differential equation?
I'm writing a function that takes a differential equation in symbolic form as an argument and I want to determine the order of t...

presque 4 ans il y a | 3 réponses | 0

3

réponses

A répondu
Why do I receive License Manager Error -97?
This is far too complicated and there are too many potential solutions. I have this error after installing MATLAB on a second c...

presque 4 ans il y a | 2

A répondu
Can't see any effect of NoiseVariance with idpoly and lsim
Maybe lsim is not the right function to use. I solved the problem by using sim instead, which has options including to add nois...

presque 4 ans il y a | 0

Question


Can't see any effect of NoiseVariance with idpoly and lsim
I'm trying to simulate this system with an output disturbance. With or without NoiseVariance specified I cannot see any differe...

presque 4 ans il y a | 1 réponse | 0

1

réponse

Question


How to get number of factors after factorizing a symbolic function?
I'm using factor to factorize a symbolic polynomial. Works well but when the result is a symbolic vector containing the factors...

presque 4 ans il y a | 1 réponse | 0

1

réponse

Question


Using factor on symbolic expression but not always factorizing
I'm trying to show both versions of a symbolic equation, one unfactorized and one factorized. This example works as expected:...

presque 4 ans il y a | 1 réponse | 0

1

réponse

A répondu
Find the transfer function of a differential equation symbolically
@madhan ravi was right. Using the simplify command works in this case: rhs(eqn_s0) / U(s) / (simplify(lhs(eqn_s0)) / Y(s)) ...

presque 4 ans il y a | 0

| A accepté

A répondu
Find the transfer function of a differential equation symbolically
Maybe the problem is something to do with simplifying the left hand side when Y(s) is a function. If you substitute Y(s) for a ...

presque 4 ans il y a | 0

Question


Find the transfer function of a differential equation symbolically
As an exercise, I wanted to verify the transfer function for the general solution of a second-order dynamic system with an input...

presque 4 ans il y a | 2 réponses | 0

2

réponses

A répondu
How to make a symmetric matrix with symbolic elements
This seems to work: >> Q = tril(Q.') + triu(Q,1) % Uses top half of Q to make Q symmetric Q = [ q1_1, q1_2, q1_3] [...

presque 4 ans il y a | 0

Question


How to make a symmetric matrix with symbolic elements
There's already a similar question for how to make a symmetric matrix with certain values. But I want to create a symbolic ma...

presque 4 ans il y a | 1 réponse | 0

1

réponse

A répondu
Is there any concept like dictionary or hash tables in matlab like in Python?
struct seems to produce a much nicer text output than container.Map: % Example with struct settings = struct(); settings.open...

environ 4 ans il y a | 0

Question


Band Error in idinput - Unrecognized function or variable 'u'.
I was playing around with the Band argument for idinput and got this error. >> Range = [-1,1]; >> Band = [0 2]; >> u_signal =...

environ 4 ans il y a | 1 réponse | 0

1

réponse

Question


Is it possible to have a table with a numerical index instead of strings?
I'm new to MATLAB and wanted to make a table containing time-series data where the index (time) is a series of integers. I trie...

environ 4 ans il y a | 3 réponses | 0

3

réponses

Question


How to step through a discrete model simulation one step at a time
I have a discrete-time ARX model that I want to use to represent the plant in a simulation: Ts = 1; sigma = 0.01; d = 3; sys...

environ 4 ans il y a | 1 réponse | 0

1

réponse

Charger plus