Risposto
How to express a variable (function) in terms of specific variables?
syms C_S C_CS C_BS C_C C_P C_B r1 r2 r3 k_A k_A1 k_S k_S1 k_D k_D1 Ct = C_S + C_CS + C_BS r1 = k_A*C_C*C_S - k_A1*C_CS; r2 = ...

quasi 5 anni fa | 0

Risposto
How to normalize state variables in ODE45 each timestep.
Some thoughts: a. If you know from the application that you don't have to worry about getting close to singularities, integrate...

quasi 5 anni fa | 0

Risposto
Feedin vector in feedback function for mimo systems
Try an example with a known solution. A = -diag(1:4); B = eye(4); C = eye(4); D = zeros(4); sysp = ss(A,B,C,D); sysk = ss(dia...

quasi 5 anni fa | 0

| accettato

Domanda


How Can I Extract One Period of a Periodic Function that is Defined with Mod() ?
Suppose I have a function, for example syms t real f(t) = triangularPulse(-1,1,t) Now create its periodic extension using mod...

quasi 5 anni fa | 0 risposte | 0

0

risposte

Risposto
Output the amount of time it took to run a simulation
Execute simout = sim(…) Then look at simout.SimulationMetadata.TimingInfo

quasi 5 anni fa | 1

Domanda


Can't Uninstall, What Should I Do?
Matlab, actually Simulink, was throwing some weird error. So I thought I'd unintall and then do a fresh install (of 2020b). Bu...

quasi 5 anni fa | 1 risposta | 0

1

risposta

Risposto
symbolic variables into double array, observability matrix
The function obsv() in the Control System Toolbox only accepts numeric input. If you want the symbolic form of the observability...

quasi 5 anni fa | 0

Risposto
Removing path name from Simulink block name
I'm seeing the same thing, though I'm not sure that is correct base on the documentation. And it is certainly a limiting behavio...

quasi 5 anni fa | 0

| accettato

Risposto
discrete-time real exponential signal
Those points at zero show up because alpha is negative and the code is raising alpha to non-integer powers t. For those values o...

quasi 5 anni fa | 0

| accettato

Risposto
Converting differential equations to State-Space/Transfer Function representation
There really is no need to use the symbolic stuff (though you can if you really want, at least for part of the problem). Suppose...

quasi 5 anni fa | 3

| accettato

Risposto
Collect does not do the job
Here is one approach showing step-by-step. Many could be combined. Maybe there is a simpler way? syms y y0 muY(y) dt f=(y*di...

quasi 5 anni fa | 0

| accettato

Risposto
In the Symbolic toolbox,how to get the results like in the old version
% first example syms x g(x) = 1/(x - x^2); f(x) = int(g(x)) simplify(rewrite(f(x),'log'),100) % as it turns out, f(x) retur...

quasi 5 anni fa | 1

| accettato

Risposto
how to build a control system with one input and multiple outputs
Here is one approach (there are others), with simple examples tf's for C, F, and G, that you should be able to adapt to your pro...

circa 5 anni fa | 0

| accettato

Risposto
Why does using a symbolic function as argument in a function give 'not enough input arguments' error?
There seems to be more f's than is needed. If the first input to bisection from the caller is a symfun, it should be usable dire...

circa 5 anni fa | 0

Risposto
Using symbolic integration: Why does my double integral returns different numerical values depending on integration order?
Comment: I'm not going to use the anonymous functions because, as far as I know, those are invalid inputs to int and I don't kno...

circa 5 anni fa | 2

| accettato

Risposto
How do you use ode45( ) when the equation is not in dy/dt form?
Check out this link ....

circa 5 anni fa | 0

Risposto
Basic Difference Equation Plot
Look carefully at these lines I = zeros(1, 500); I(1) = 50; for t = 2:100 I(t+1) = I(t) + rI * I(t) * (1 - I(t)/f(P)) - ...

circa 5 anni fa | 0

Risposto
Compare two string vectors with same input arguments but different length
If stored in a cell arrary: c1 = {'a','b','c','d','e','f','g','h'}; c2 = {'a','a','b','c','d','d','d','e','e','f','g','h'}; ...

circa 5 anni fa | 0

| accettato

Risposto
Plot Fourier Series from a variable
The easiest way would be to use fplot(). Also, use assume() instead of evalin syms x k L n % evalin(symengine,'assume(k,Type::...

circa 5 anni fa | 0

| accettato

Domanda


How Can the Output of odetovectorfield be Used
Other than sending to matlabFunction(), how can one use the output of odetovectorfield? syms x(t) eqn = diff(x(t),t,2) + diff(...

circa 5 anni fa | 1 risposta | 0

1

risposta

Risposto
Find non singular transformation matrix
Assuming the goal is as described in this comment, one solution would be: T1 = [0 0 0 0 0 0 1 0 1 0]; T = [T1;null(T1).']; S...

circa 5 anni fa | 0

| accettato

Domanda


Is the LiveScript Editor Connected to the Base Workspace?
I have a live script that does a bunch of stuff. After the script runs I have some variable from that script in the base worksp...

circa 5 anni fa | 1 risposta | 0

1

risposta

Risposto
Extracting the numeric part from a cell
str = ["injection-0:94577)" "injection-0:94578)" "injection-0:94579)" "injection-0:94580)" "injection-0:94581)" "injection-...

circa 5 anni fa | 0

| accettato

Risposto
answer different on MATLAB than the expected answer
Mathematically, the answers are the same because the Ci are abitrary constants (absent any othe conditions on the solution). So...

circa 5 anni fa | 2

| accettato

Risposto
Fourier Series for thin airfoil theory
From the equation it looks to me that y is scalar function and the independent variable x is also a scalar. Are xcam and ycam b...

circa 5 anni fa | 0

| accettato

Risposto
Undefined function 'Poles' for input arguments of type 'double'.
From the way the code is written it looks like Poles is supposed to be a variable. But the code never actually computes Poles. S...

circa 5 anni fa | 0

| accettato

Risposto
Applying single input and single output to mimo system
The definition of sys1 has three outputs. However, the first two rows of C are zero, so outputs y1 and y2 will be zero. The thir...

circa 5 anni fa | 0

| accettato

Risposto
System of coupled Differential algebraic equations
The ode15i solver might do the trick doc ode15i

circa 5 anni fa | 0

| accettato

Risposto
Question about matricies in Matlab
You'll have to fill in the last spot ox x2 with something if you want to combine x1, x2, and x3 into a single matrix. The value ...

circa 5 anni fa | 0

| accettato

Domanda


Why Does "clear all" Impact Prior Commands in a Script?
Here is the example code. If I comment the "clear all" line in Section 2 the ouput of fplot() in Section 1 comes out fine with ...

circa 5 anni fa | 2 risposte | 0

2

risposte

Carica altro