Réponse apportée
Empty linear analysis workspace after linearising model
linsys1 isn't empty. It's a static gain of zero. Double click the Derivative block. If the Parameter ("Coefficient c ....") i...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Euler's method code
The code that is posted solves a differential equation of the form y'(x) = f(x,y), y(0) = y0 and compares it to the exact solu...

environ 5 ans il y a | 0

Réponse apportée
Finding curve length of vector r(t)=<2t, t^2, 1/3t^3> Given0<=t<=1
It looks like the equation for "magnitude" is incorrect Why is magnitude the sqrt of the sum of the squares of each individual ...

environ 5 ans il y a | 0

Réponse apportée
How to explicit a matlab equation by using the symbolic toolbox?
Looks like there are two solutions for V based on reasonable assumptions: syms rho V CD0 K W S T positive syms gamma real eqn...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
diff function rearranges symbolic expression leading to non-vanishing terms
Why not just use collect() and coeffs() on the elements of dxdt? If the system is affine in u, then those should give the desir...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
DC gain discrete-time transfer function error
I think the problem is just inaccuracy of the numerical computation of the freuqency response at very small frequencies. Keep i...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Roots of a polynomial with variables
Don't know the scope of the actual problems of interest, but for the two examples in the question: syms x y sol = solve(3*x*y ...

environ 5 ans il y a | 0

Réponse apportée
Boundary Value Problem\ Symbolic solution
Need to use sym(pi) syms y(t) cond = [y(0)==0,y(1)==0]; X = dsolve(diff(y,t,2)+sym(pi)^2*y==0,cond)

environ 5 ans il y a | 1

| A accepté

Réponse apportée
Heun's method stiff ODE
Correct implementation of Heun's method, as I understand it, is given below and compare to the analytic solution and other equat...

environ 5 ans il y a | 2

| A accepté

Réponse apportée
How to solve a system of second order nonlinear differential equations with boundary conditions
I was not able to solve the problem for the boundary conditions specified at t=2. But I was able to get a resonable looking sol...

environ 5 ans il y a | 0

Question


What is the Best Way to Deal with an Empty Line Object?
Suppose I have some data: x = 1:10; y = 1:10; Now I want to plot three lines based on three logical index vectors. i1 = x<=3;...

environ 5 ans il y a | 2 réponses | 0

2

réponses

Réponse apportée
Strange form of increasing when derivating sine waves
I think you're seeing the effect of the discrete time step combined with numerical approximations to the differentiation and the...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Using ODE1 in Simulink yields different results for an equivalent model run in a for loop
I think some of the equations are out of order. I got a match (obviously using my inputs) with this: h = Ts; %sample period q...

environ 5 ans il y a | 0

Réponse apportée
How to make state space for two or more inputs with same number of state variables
Without seeing the code that constructs the model, it's unclear if the desired end state is even achievable. You can always try ...

environ 5 ans il y a | 0

Réponse apportée
[DISCONTINUED] MATLAB Answers Wish-list #5 (and bug reports)
After I click the "Follow" link on a question, I'd like that question to show up in my Managed Followed Content list immediately...

environ 5 ans il y a | 1

Réponse apportée
How were the matrices for A G and C derived in this answer
The matrices are not developed by linearizing and then discretizing the nonlinear differential equation. The doc says that they...

environ 5 ans il y a | 1

Réponse apportée
How to get rid of sign() in diff() results?
If the goal is to get an expression for the amplitude of the frequency response of H(s) and then differentiate ... syms R1 R2 C...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
zero frequency amplitude issue at fft
In the third plot, the data tip is not at X = 0 (as is the case with the first two plots). Try zooming in and picking the actua...

environ 5 ans il y a | 0

Réponse apportée
Difference between eigs and svds
eigs returns eigenvalues and eigenvectors. svds resturns singular valuese and singular vectors. Why would there be an expectat...

environ 5 ans il y a | 0

Réponse apportée
MATLAB can't compute a closed-loop final-value theorem on a controller.
Is that feedback gain matrix correct? Note that here I'm using K, but the code above used k1 and k2, which were not defined. Ph...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Element by element multiplication of a matrix
For the matrix exponential: % example data H = [1 2;3 4]; t = 0:5; f = cell2mat(cellfun(@expm,mat2cell(H.*reshape(t,1,1,[]),...

environ 5 ans il y a | 0

Réponse apportée
a problem with pade approximation
tf objects have three delay properties: InputDelay, OutputDelay, and IODelay. Look at all three of these properties for each ele...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Demux and State Space Dimension errors
If the output of the State Space block has four elements, then set the "Number of outputs" parameter of the Demux block to 4.

environ 5 ans il y a | 0

Réponse apportée
Plotting lsim directly results in different plot when writing to variables first
plot() is a general purpose plotting function and has no way of knowing that the inputs to be plotted represent sample times and...

environ 5 ans il y a | 0

Réponse apportée
Area between two curves without intersection
I think this is what you're looking for: x=[0,-1.66128688049154,-3.71843384492024,-6.03903044153544,-8.52179344691878,-11.06847...

environ 5 ans il y a | 0

Réponse apportée
Conflicting Simulink mdoels - transfer function
The block diagrams don't represent the same system. The easiest way to see this is that the loop transfer functions are differen...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Multivariate normal random numbers vs. random numbers from normal distribution
I'm not quite sure what you did to create y, since the code generates y as a single column. It looks like y was produced by: m...

environ 5 ans il y a | 1

Réponse apportée
generating wrong Nyquist plot of tf
Keep in mind that nyquist() doesn't draw the arc at infinity due to the double pole at the origin. If you zoom in around the or...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
numerical curl vs symbolic curl
In addition to fixing the meshgrid per the comment above ... The eigenvectors Uk are normalized differently between the symboli...

environ 5 ans il y a | 0

Réponse apportée
How can I exchange sqrt(-1) with 1i
I thought that all that would be needed is to assume that g is positive: syms g positive sqrt(-g) Alas, this approach doesn't...

environ 5 ans il y a | 0

| A accepté

Charger plus