Answered
Find the 5-point DFT of the sequence:
The code posted has a few issues. The second line is: >> u = sin(j) u = 0.0000e+00 + 1.1752e+00i >> whos u Name...

1 month ago | 0

| accepted

Answered
Cannot compute Riccati solution for LQI controller
I'm not sure it's relevant, but should the fifth row of SYS.c be all zeros? I suspect the issue is with stabilizability of the ...

1 month ago | 0

| accepted

Answered
How to solve a symbolic complex equation with real and imaginary parts?
I'm not sure what "change the paramters of the solve function" means. If a general apprach is desired, maybe something along the...

1 month ago | 1

| accepted

Answered
Problem with integrating Sin to Cos
If you just want ode in terms of cos() >> ode = int(sin(n*x),x,0,pi/2) ode = (2*sin((pi*n)/4)^2)/n >> rewrite(ode,'...

1 month ago | 0

Answered
Simbolic simplification of trigonometric functions
How about this: >> simplify(f,500) ans = -(sin(x)*(- sin(x)^2 - c)^(1/2)*(sin(x)^2 - 1)^2)/(2*d^2)

1 month ago | 1

| accepted

Answered
How to generate correlated samples from a single distribution? Each sample should be correlated with the previous.
I don't think the questionn is well posed. The question and the code make it sound like there is a single distribution and the s...

1 month ago | 0

Answered
how can i use symsum to make function with a variable apart from syms k?
This code works for the specified sequences. It would need to be modified if either x[n] or y[n] take on non-zero values for n <...

1 month ago | 0

Answered
Problems with the controllability matrix.
ctrb() in the Control System Toolbox only accepts numeric inputs. If you have numeric values for the variables, you can substit...

1 month ago | 0

| accepted

Answered
Making a transformation matrix in matrix format
You're not getting 4, 1 x 4 matrices. It just looks like that because of the formatting to the diplay. >> syms th d alph l A...

1 month ago | 0

| accepted

Answered
How to shift state space models by equilibrium points using ss and lsim?
The states, inputs, and outputs of Sys are all perturbations from the equilibrium solution. The intiial condition to lsim (x0) w...

1 month ago | 0

| accepted

Answered
Differntial equations and Initial conditions
The initial conditions are set to represent the initial conditions of the system to be simulated. What other considerations migh...

1 month ago | 0

| accepted

Answered
Matlab Code for DTFT to get frequency response
n, h, and w are all defined as row vectors and the * operator is trying to do matrix multiplication. But what you really want i...

1 month ago | 0

Answered
Help with simplifying a complex symbolic expression
This code eliminates U_j0: [num,den]=numden(term1); newnum = combine(num,'log','IgnoreAnalyticConstraints',true); newterm1 = ...

1 month ago | 0

| accepted

Answered
Laplace Transform for ODE - RC Circuit
I think that last subs command is getting confused because q is defined as the solution of the ode. I'm not sure why that's a pr...

1 month ago | 1

| accepted

Answered
Fourier Transformation of dirac comb
There is one too many points in the signal y. If you plot([y y]) and zoom in you'll see the pulse at sample 1001 immediately ...

2 months ago | 1

| accepted

Answered
Convert s in j*ω in a transfer function
No need to change anything in sys. It is a tf object and either freqresp() or bode() can evaluate sys at s = j*w doc freqresp ...

2 months ago | 1

| accepted

Answered
How to find DTFT of given sequence in matlab
Assuming that y(n) = 0 for abs(n) > 5, there are are only three values of n for which y(n) is non-zero. Put those values of n an...

2 months ago | 0

Answered
Printing out pi as a symbol in equations instead of the numerical value
If I understand the problem, it appears the idea is to define a function, an_Id, that can be used for both numerical evaluation ...

2 months ago | 0

Answered
probability - execution of an operation
If T has a normal distribution, then doc normcdf can be used to find the probability P(T < t)

2 months ago | 0

| accepted

Answered
Calculating and Plotting Weibull Distribution Function(wblpdf) with Cell Arrays
Here's an example that you might be able to adapt to your needs. >> params = {[1 2];[2 3];[3 4]}; % define cell array with par...

2 months ago | 0

| accepted

Answered
I want to find where the root locus branches cross the y axis.
One option would be to use the return values of rlocus: [r,K]=rlocus(G1) to get a coarse idea of the value of K that results i...

2 months ago | 1

| accepted

Answered
Convert transfer function writing form
Maybe something like this: >> H = tf([15 25 1],[5 0 5],-1) H = 15 z^2 + 25 z + 1 ----------------- 5 z^2 + 5...

2 months ago | 1

| accepted

Answered
Is it possible to manually connect the ABCD matrices to obtain the ss representation
Need to modify two lines of code as follows: clc; clear all; k = 1; m = 1; b = 1; A = [0 1; -k/m -b/m]; B = [0 1/m]'; C ...

2 months ago | 0

| accepted

Answered
c2d with 'impulse' method
I don't think you can use c2d() and get z/(z-1) with a sample time T = 0.1. In, short, the factor of 0.1 is needed to have the ...

2 months ago | 0

| accepted

Answered
Plotting a bode diagram without transfer function, using only magnitude and phase and frequency
You can use the data you have to make an frd model: doc frd Once you have the frd model you can make the bode plot using the b...

2 months ago | 0

Answered
How to programmatically know if a block is a sink block?
I'm actually suprised that there's not an easier way to to do this. The BlockType is a read-only so checking: ismember(get_par...

2 months ago | 0

Answered
Symsum function for basic electrical engineering calculations.
symsum() is a function in the Symbolic Math Toolbox and takes in symbolic inputs. If I understand that code correctly, all of th...

2 months ago | 0

| accepted

Answered
How can I evaluate characteristic functions in MatLab?
The CF is the Fourier transform of the pdf. Approximate the pdf as a sum of line segments. Take the sum of the Fourier transfor...

2 months ago | 2

| accepted

Answered
Defined domain integral(convoulution) in simulink
Assuming h is constant and h >= 0 .... It seems like the model can be expressed as follows: wdot(t) = A*w(t) + B*u(t) z(t) = ...

2 months ago | 0

Answered
solving integral equation where the unknow is the upper limit
Assuming T and T0 are positive, it looks like there are two values of T that will satisfy the equation. Not sure why your code i...

2 months ago | 0

Load more