Answered
Fourier transform of sum of sinusoids
The exact Fourier transform can be found as: syms w1 w2 w3 t w f(t)=sin(w1*t)+sin(w2*t)+sin(w3*t); F(w)=fourier(f(t),t,w)

5 years ago | 0

| accepted

Answered
coeffs of symbolic equation
Is this what you're looking for: syms x y z=x+2*x*y+4.*y+5*x*y^2; [cxy,t]=coeffs(z,[x y])

5 years ago | 0

| accepted

Answered
How to represent 2 inputs 4 outputs closed loop state space system as a MATLAB code? please help!
According to doc connect the last two arguments to connect() should each be a char or cell arrays of char, in the order inputs...

5 years ago | 0

| accepted

Answered
Fourier Series using MATLAB
You probably want f1(x) = piecewise(x < -sym(pi), 0,x < 0,-x-sym(pi), x<=sym(pi), x+sym(pi), x>sym(pi), 0); You'll find some o...

5 years ago | 0

Answered
Variable Substitution of a Function
It is correct, isn't it? x1^2 = (-x1)^2, x1*x2 = (-x1)*(-x2), and x2^2 = (-x2)^2

5 years ago | 0

| accepted

Answered
Finding Symbolic Matrix Derivative
Declare theta and phi as functions, and then substitute after differentiating A syms phi(t) theta(t) phi_dot(t) theta_dot(t) A...

5 years ago | 0

Answered
Symbolic matrices multipleid incorrectly
What was your actual check that the result does not pass? Maybe you need to simplify() the result? M1=sym('m1',[2 2]); M2=sym...

5 years ago | 0

Answered
Load variables into a simulink model from a Matlab funtion.
Check out the doc page for the sim() command doc sim The sim() command has some options that do what you want, including the S...

5 years ago | 1

| accepted

Answered
Finding Time Constant from Root Locus of a Transfer Function
Right click a point on a rlocus plot and a data tip will pop up with useful information. Unclear what Vr is or how it relates t...

5 years ago | 0

| accepted

Answered
How can I compute the CDF between - infinity to TH
Check out doc normcdf

5 years ago | 0

| accepted

Answered
Spiral density function implementation
I'm going to assume that the question means that the conditional density of r given theta is normal with exepectation mu = theta...

5 years ago | 0

| accepted

Answered
Error in acker function, poles do not much size A?
poles should have three elements based on the size of A, but it only has one: >> poles poles = -4.0800e+03

5 years ago | 0

Answered
Define a density function and draw N samples of it
The Statistics and Machine Learning Toolbox has lots of typical densities that can be used to generate samples of random variabl...

5 years ago | 0

Answered
How to add matrix in a matrix which is obtained using syms function?
blkdiag() seems to work blkdiag(B1,B2) though interestingly enough it appears that blkdiag is not a supported function for the...

5 years ago | 0

Answered
Conditional normal random distribution
I'm going to assume that for any value of theta, the radius (rho) is normally distributed with mean 2*theta and variance = sigma...

5 years ago | 0

| accepted

Answered
z transfer function - cascade
Simulink has a host of commands (doc page) that can be used to create and edit block diagrams.

5 years ago | 0

Answered
Plot convolution of two wave signals
If we assume that m(t) = c(t) = 0 for t < 0, we can show analytically that the convolution integral m(t)*c(t) is periodic with p...

5 years ago | 1

Answered
Setting initial condition of State Space model (not block in Simulink)
I'm almost certain that the initial conditions are not a settable (is that a word?) property of ss objects. The initial conditio...

5 years ago | 1

| accepted

Answered
How to find response of a system through convolution?
I don't think you're doing anything wrong. Rather, what you're seeing is the effect of approximating a convolution integral wit...

5 years ago | 1

| accepted

Answered
Simulink Transfer Function Variable from Matlab
Try using a Constant block and set its parameter to wref, instead of using an Inport for wref. The error message sounds like th...

5 years ago | 0

| accepted

Answered
Postive PM and GM but unstable closed loop response
Closed loop stability needs to be determined before caculating GM and PM. In other words, GM and PM cannot be used to determine...

5 years ago | 0

Answered
Step response with initial condition
According to the question, the output should satisfy y(t=0) = 10. But the system, u_del, as specified will yield a step response...

5 years ago | 0

Answered
Simulink computational load of each subsystem (or block)
Check the doc pages for the the Simulink Profiler, Solver Profiler, and various pages on how to optimize performance, if you hav...

5 years ago | 0

Answered
[Solved] How do you use rlocus with multiple feedback loops?
Start with the correct characteristic equation: 1 + D(s)*G(s)*I(s) + D(s)*G(s)*Kt = 0 (not sure why the picture shows the last...

5 years ago | 0

Answered
How to implement an Impulse Delay in Simulink
Not sure I've ever seen that called an "impulse delay." Doesn't matter what it's called. If Td is constant, the Transport Delay...

5 years ago | 0

| accepted

Answered
Integrate a bivariate normal distribution over y when x is fixed
One simple approach is to evaluate f(a,y) for vector of y from y1 to y2 and then use cumtrapz() or trapz() on the result.

5 years ago | 1

| accepted

Answered
How to detrend the signal?
Have you looked at doc detrend

5 years ago | 0

Answered
How to Solve a Second-Order Differential Equation?
>> syms x y(x) eqn2 = x*diff(y,x,2) + 2*diff(y,x) - x*y == 2*exp(x); sol = dsolve(eqn2); sol = rewrite(sol,'exp'); sol = sim...

5 years ago | 1

| accepted

Answered
Creating Symbolic state space model and transforming to canonical form?
Yes, at least in principle. For example: >> A=sym('a',3) A = [ a1_1, a1_2, a1_3] [ a2_1, a2_2, a2_3] [ a3_1, a3_2, a3...

5 years ago | 0

| accepted

Answered
Designing LQR controller error
The system might be controllable in principle, but in reality seems to be problematic for using state feedback. I had trouble ev...

5 years ago | 0

| accepted

Load more