Risposto
Problem passing sine wave through if statement
Hi Matthew, The "Port 1" referenced in the error message is the first output port, not the input port. All output ports from th...

quasi 4 anni fa | 0

| accettato

Risposto
What is the physical interpretation of sos in Zp2sos function?
Hi Andi, Addresing the second part of your question: " why we need to do this" filtfilt will accept either transfer function (...

quasi 4 anni fa | 0

Risposto
why does my data kick up at the end after doing ifft(X)
Hi Joanne It will be easier for people to help if you post the data. Use the paper clip icon to attach it to your question as a...

quasi 4 anni fa | 0

Risposto
How to vectorize a complex function?
Hi Babak, Here is a one line solution. Whether or not it's more efficient/effective/clearer than the loop is an open question. ...

quasi 4 anni fa | 0

Risposto
Reduce length of sum of products of symbolic variables
Hi Moritz, Would you mind explaining why it's necessary to get the expression into a particular form? Recreating the expressio...

quasi 4 anni fa | 0

| accettato

Risposto
Not able to use the if condition as desired in simulink
The outputs of an If block can only drive If-Action subsystems. At a minimum, the limiter blocks need to be wrapped inside If-Ac...

quasi 4 anni fa | 0

Risposto
Plotting the frequency response of a bandpass filter around a frequency fc
The code as implemented uses the form of freqz with the w input in normalized frequency in units of rad. The w vector on input r...

quasi 4 anni fa | 1

| accettato

Risposto
How do I use methods from a class that works in matlab and use it in simulink?
How will the object instances be used in Simulink? This blog post and its follow-ups may be of interest.

quasi 4 anni fa | 0

| accettato

Risposto
Is there a zpk block in simscape?
Zero-pole-gain block in Simulink, don't know if there is a specialized or alternate version in Simscape.

quasi 4 anni fa | 1

| accettato

Risposto
Offset in filtered data when using filtfilt() Function
Thanks @Jan The filter, d, does not have unity gain at dc. fc = 0.4; d = designfilt("lowpassfir", 'PassbandFrequency', fc, 'S...

quasi 4 anni fa | 1

Risposto
complex ifft output for hermitian input
Hi Md. I didn't inspect the whole code, but did notice that the calcuation of timeResp seemed to have the ifft/ifftshift operat...

quasi 4 anni fa | 1

| accettato

Risposto
How can I evaluate a complex definite integral?
Hi Valentin, Shouldn't the lower bound on the integral be fg2, not 0? Don't see how the reult will be 0.2952. The integrand is ...

quasi 4 anni fa | 1

| accettato

Risposto
minreal tolerance not respected
Hi Daniel, As best I can tell after sifting through the code, tol is generally compared to the distance between the zero and po...

quasi 4 anni fa | 1

Risposto
Energy and Power of a Piecewise Function
Hi Iakovos, Try using piecewise to simplify things. syms t real x(t) = piecewise(-3 <= t <= 0, cos(sym(pi)*t),0 < t <= 2, 2, ...

quasi 4 anni fa | 1

| accettato

Risposto
DC gain for FIR high-pass filter using fir1
Hi Masao, Let's try the proposed methods. High-pass fir1 filter bhigh = fir1(500,5/750,'high'); [h0,w] = freqz(bhigh,1,0:.00...

quasi 4 anni fa | 0

| accettato

Risposto
Plotting sin (x/x) function in terms of Mag(dB) over Frequency
Hi IFECHUKWU, sin(x)/x can take on negative values, for example x = 5*pi/4; sin(x)/x Taking the log10 (as neeed for dB, not ...

quasi 4 anni fa | 0

| accettato

Risposto
DSP/IIR filter butterworth
Hi Steven, Here is the original code (with minor changes) fpass = 2500; fstop = 4000; As = 95; Rp=3; fs=44100; %Data wp=(fpas...

quasi 4 anni fa | 1

| accettato

Risposto
nonlinear variable state space observer pole placement
Hi Bernd, Matlab assumes by default that all sym variables are complex, and this assumption can sometimes lead to unexpected re...

quasi 4 anni fa | 2

| accettato

Risposto
How to mean data of second column with respect to the similar element in the first column
Check out splitapply. Applies directly to this problem.

circa 4 anni fa | 0

Risposto
Problem with factoring a symbolic variable
If only one term contains Td_s, then syms T_u T_t T_s tau_u Tdd_u Tdd_t Tdd_s Td_u Td_t Td_s; eq = sin(T_s - T_u)*Td_s^2 + sin...

circa 4 anni fa | 0

Risposto
[DISCONTINUED] MATLAB Answers Wish-list #5 (and bug reports)
I wish that the Categories feature be much more useful. Check out hte categorization of this Question: Scroll over the right ...

circa 4 anni fa | 0

Risposto
Use Matlab Function Block to plot into figure created by Matlab Script
Hi Jannis, I got this model to work The code in the Matlab Function block is function y = fcn(u,t) persistent ax1 if ...

circa 4 anni fa | 0

Risposto
Gain/phase margin calculated relative to -540.
Hi Jaco-Louis From the Question: "... according to the margin documentation it is supposed to return the minimum margins, which...

circa 4 anni fa | 0

Risposto
z transform of a left handed sequence
Hi AlireaA You are on the right track by breaking this problem into two parts. Let's look at the first part syms n integer sy...

circa 4 anni fa | 0

| accettato

Risposto
z transfer function evaluates to inaccurate value near z=1
Hi Ashish, This problem illustrates a couple of things to keep in mind when using the Control System Toolbox Here is the origi...

circa 4 anni fa | 2

Risposto
Failing to plot a fourier transform
Hi Lorenzo, On the face of it, the Symbolic Math Toolbox treatment of (normalized) sinc(x) is disappointing. Perhaps there are ...

circa 4 anni fa | 1

| accettato

Risposto
Infinity appears at Constant block in Simulink
That “inf” is the sample time of the constant block. As is the “D1” on the other blocks. Check the Simulink doc on sample times ...

circa 4 anni fa | 0

| accettato

Risposto
How to apply the reference target for LQR or LQG controller
Hi JS, One common way to track a reference input with a Type 1 system is to use integral control by augmenting the plant with a...

circa 4 anni fa | 1

| accettato

Risposto
Why am I receiving three outputs for this lsim function?
Hi Hunter k1=1; A=[0 1 0 0 ;-k1 -0.4 k1 0.4 ;0 0 0 1; 0.25 0.1 -0.25 -1.35]; B=[5;0;0;0]; C=[1 0 0 0]; D=0; x0 = C; t = 0...

circa 4 anni fa | 0

Risposto
Solve differential equation to get variable
Hi Milan, I modified as follows. Not sure if this is what you're looking for: syms d_F ; syms d_F_c; syms dM_B; %syms Thet...

circa 4 anni fa | 0

| accettato

Carica altro