Answered
Differential Equation Solution incorrect with matlab compared to maple
The Maple solution does include imaginary terms, like 5*pi*1i/3, but we'll show that those terms cancel out on the interval of i...

4 years ago | 0

| accepted

Answered
Using fft to plot frequency spectrum of sum of rectangular pulses
The code below illustrates the analysis for one component of the signal. It can be adapted to include both components of the sig...

4 years ago | 0

| accepted

Answered
Integral not being computed
Simplify normDf before applying int(). Don't know why int() doesn't do this on its own syms t assume(t, "real") f1 = 3*t-t*t...

4 years ago | 0

| accepted

Answered
Simulink vector index assignment / re-ordering using Selector block
Normally, you can put any Matlab expression in a block parameter dialog. So if u_pos and du_pos are defined in a workspace that...

4 years ago | 0

| accepted

Answered
why my fft does not match my convolution ?
The DFT of the product of two finite duration sequences is the normalized circular convolution of their DFTs. For example: x = ...

4 years ago | 0

| accepted

Answered
How do I get time-domain data for Control System Internal AnalysisPoints
I think this function can find the model from any input to any output, including Analysis Points doc getIOTransfer

4 years ago | 0

Answered
Trying to plot a frequency response (magnitude and angle) using the equation of a forced vibration
According to the problem statement, the time increment should be 0.01 t = 0:0.01:1; Other than that, the Matlab code implement...

4 years ago | 1

Answered
When simulating the response to a specific input signal, the input data U must be a matrix with as many rows as samples in the time vector T, and as many columns as input chan
The size of u is 8 x 101. But as the error message says, it must have the same number of rows as t has elements (101), and it m...

4 years ago | 0

| accepted

Answered
c2d function with "impulse" method to transform the loop gain from s-domain to z-domain.
I scanned the paper and also cannot recreate their results. Because HDAC has the form of a zero order hold, I would have tried: ...

4 years ago | 0

Answered
Multiplication of non-zero symbolic functions yields zero answer
Disclaimer: The doc page shows no examples of multivariate piecewise functions. I assume that is ok and that piecewise still ju...

4 years ago | 1

| accepted

Answered
what is the relation between π*radian/sample and Hz in frequency axis of wvtool for windowing?
Very short answer: In discrete time* using the nomenclature of wvtool and freqz, "Hz" means cycles/sample (not cycles per sec). ...

4 years ago | 0

| accepted

Answered
How to extract data from a structure? How to concatenate the extracted data in array or matrix?
Not sure what the issue is. The code posted in the question seems to work exactly as expected for 1-4 (except for the apparent ...

4 years ago | 0

| accepted

Answered
Error in the integration result
Expected result after expand() and simplify() of fxy. Don't know why these operations are needed. syms x y Pi = sym(pi); % m...

4 years ago | 1

| accepted

Answered
Plot Fourier transform of symbolic infinite periodic rectangular pulse
As far as I know, fourier() doesn't compute a closed form expression of the Fourier transform of a general, periodic function, t...

4 years ago | 0

Answered
How to generate random state space that is both controllable and observable?
Can use this function doc rss to generate a random, continuous, state space model with poles in the LHP or origin. Not guarnat...

4 years ago | 0

| accepted

Answered
"Cannot simulate time response when internal delay model is non-casual"
It appears that the root of the problem is this line: G33 = (.87*(11.61*s^2 + 1)/(73.132*s^2 + 22.69*s + 1))*exp(-s); G33 has ...

4 years ago | 1

Answered
how to plot impulse response function
If all that's needed is a plot of the impulse response, as opposed to a closed from expression for it, then there is no need to ...

4 years ago | 0

| accepted

Answered
Error using Plot for Fourier Series
Something doesn't look right with x on the left and right hand sides of the equation. Maybe the x on the right hand side should ...

4 years ago | 0

Answered
Inverse Fourier Transform Using ifourier command
Sometimes simplify is needed: syms w t X(w) = 4*sin(w/2)^2/w^2; x(t) = ifourier(X(w),w,t) x(t) = simplify(x(t),100) fplot(x...

4 years ago | 0

| accepted

Answered
Sym 1x1 in Matrix
syms th1(t) th2(t) th3(t) th1_d(t) th2_d(t) th3_d(t) a1 a2 a3 m1 m2 m3 g P2 = [a2*cos(th1)*cos(th2)/2; a2*sin(th1)*cos(th2)/2; ...

4 years ago | 0

Answered
How to save data of a continuous signal to the workspace where multiple simulink models are running in matlab R2016a.
Assuming the signals are continuous, the average value of a signal f(t) at over the interval from 0 to T is: So, input the si...

4 years ago | 0

Question


What Should Happen when a Live Script is Executed from the Command Line?
I have a Live Script myscript.mlx. I accidentally used myscript as a command on the command line >> myscript As soon a I hit ...

4 years ago | 1 answer | 0

1

answer

Answered
How can i generate random variablewith non chi square distribution for product Nakagami distribution
The Statistics and Machine Learning toolbox supports the non-central chi squared distribution, if that’s what you are looking fo...

4 years ago | 0

Answered
How can I create a custom probability distribution?
Check out the doc page for distributionFitter and the associated Distribution Fitter app. Despite the name, the app can be used ...

4 years ago | 1

| accepted

Answered
Different Fourier transform (fft) of the same signal with different sampling frequency
What is meant by "insensitive?" I don't see how DFTs could, in general, be the same for different samples of a continuous tim...

4 years ago | 1

Answered
Minreal function difference between 2021a and 2021b
Running 2021b in the Answers facility yieds results that are very close to, but not exactlyl the same as, what you got in 2021a....

4 years ago | 0

| accepted

Answered
Problem in matrix partition for uncertain system: how to find matrices A, B1, B2, C1, C2, D11, D12, D21, D22?
Edit: This answer thread was intended to be a response to this comment. %% Plant Paramiters Ts= 0.0005; f= 60; Wo= 2*pi*f; ...

4 years ago | 0

Answered
How can I generate the energy vector?
@studentmatlaber I believe that you are correct that in discrete time the energy of a signal is given by syms s(n) E assume(n...

4 years ago | 0

Answered
Is there any way to represent symbolic variables as I write from left to right?
Since R2021a, one can define symbolic matrices. I haven't really used them too much and so don't know how to get any further th...

4 years ago | 1

| accepted

Answered
DTFT on for filter
What exactly is not matching for h2? Did you do something different for h1? Looks like freqz returns the DTFT of h2 as it shoul...

4 years ago | 0

Load more