Answered

I should convolve my signal with which function to have the signal itself?

Hi Donya, dirac is only defined in the Symbolic Math Toolbox and so should only be used for symbolic math, and only for continu...

I should convolve my signal with which function to have the signal itself?

Hi Donya, dirac is only defined in the Symbolic Math Toolbox and so should only be used for symbolic math, and only for continu...

etwa ein Monat ago | 0

Answered

Error when taking the continuous time Fourier transform

Using some examle data ... A = 1:5; std_A = 11:15; syms t w real f(t) = sum(exp(-t./A))*heaviside(t) std_ft(t) = sqrt(sum((...

Error when taking the continuous time Fourier transform

Using some examle data ... A = 1:5; std_A = 11:15; syms t w real f(t) = sum(exp(-t./A))*heaviside(t) std_ft(t) = sqrt(sum((...

etwa ein Monat ago | 0

| accepted

Answered

How to model second order nonliniar in simulink

Hi Barak Bar-on, I depends on the form of the matrices and what you consider easy. If you already have a .m function in Matlab...

How to model second order nonliniar in simulink

Hi Barak Bar-on, I depends on the form of the matrices and what you consider easy. If you already have a .m function in Matlab...

etwa ein Monat ago | 0

Answered

how to load this function into simulink

Hi arsal Though not required, you can replace the function making_values_input with a Mux block. Double click on predictActivi...

how to load this function into simulink

Hi arsal Though not required, you can replace the function making_values_input with a Mux block. Double click on predictActivi...

etwa ein Monat ago | 0

Answered

Applying an anti-aliasing filter

I think all that we are seeing is the effect of sampling the contiuous signal, nothing to do with aliasing. Let's look at just ...

Applying an anti-aliasing filter

I think all that we are seeing is the effect of sampling the contiuous signal, nothing to do with aliasing. Let's look at just ...

etwa ein Monat ago | 0

| accepted

Answered

How to calculate the 95% (area under the curve) of Kernel probability density curve?

The function icdf can find the values of x such that P(X < x) = 0.05 and 0.95. Use those values with xline to add the vertical ...

How to calculate the 95% (area under the curve) of Kernel probability density curve?

The function icdf can find the values of x such that P(X < x) = 0.05 and 0.95. Use those values with xline to add the vertical ...

etwa ein Monat ago | 0

| accepted

Answered

How to transfer output from simulink into m-file in real time

Asusming the loop only needs the output of the simulation after the simulation completes ... Use the sim command.

How to transfer output from simulink into m-file in real time

Asusming the loop only needs the output of the simulation after the simulation completes ... Use the sim command.

etwa ein Monat ago | 0

Answered

Using the lowpass function

The only way to suppress the plot output is to specify at least one output argument (or use lowpass() in an expression, like 1*l...

Using the lowpass function

The only way to suppress the plot output is to specify at least one output argument (or use lowpass() in an expression, like 1*l...

etwa ein Monat ago | 0

Answered

looking for a way to find the largest input from 10 signals in simulink

How about the MinMax block?

looking for a way to find the largest input from 10 signals in simulink

How about the MinMax block?

etwa ein Monat ago | 0

| accepted

Answered

FFT giving undesired answer

Hi Cole, As you've already accepted an answer, perhaps you already have what you need. But I thought it might be helpful to add...

FFT giving undesired answer

Hi Cole, As you've already accepted an answer, perhaps you already have what you need. But I thought it might be helpful to add...

etwa ein Monat ago | 0

Answered

How to use Convolution in Simulink?

I think this model does what you're looking for. Here is the model that uses the convolution sum to approximate the convolution...

How to use Convolution in Simulink?

I think this model does what you're looking for. Here is the model that uses the convolution sum to approximate the convolution...

etwa ein Monat ago | 0

Answered

Compute Probability of a Multivariate Normal Distribution over Polytope

Hi Michael, If A is nonsingular, perhaps a change of coordinates will work % z = A*x muz = A*mux; Sigmaz = A*Sigmax*A.'; Pr...

Compute Probability of a Multivariate Normal Distribution over Polytope

Hi Michael, If A is nonsingular, perhaps a change of coordinates will work % z = A*x muz = A*mux; Sigmaz = A*Sigmax*A.'; Pr...

etwa ein Monat ago | 0

Answered

Warning: Imaginary parts of complex X and/or Y arguments ignored.

Hi Matthew, Why is dhdt the output argument of this line? [t, dhdt] = ode45(@thesis, tspan, [240]); Shouldn't this be [t, h]...

Warning: Imaginary parts of complex X and/or Y arguments ignored.

Hi Matthew, Why is dhdt the output argument of this line? [t, dhdt] = ode45(@thesis, tspan, [240]); Shouldn't this be [t, h]...

etwa ein Monat ago | 1

| accepted

Answered

how to inverse transfer function simulink

Hi Stanley. First off you'll need to factor out the exp(-s) and implement that with a Transport Delay block. For the non-prope...

how to inverse transfer function simulink

Hi Stanley. First off you'll need to factor out the exp(-s) and implement that with a Transport Delay block. For the non-prope...

etwa 2 Monate ago | 0

Answered

Transformation of state space model

It sounds like the Question is about forming a feedback loop. In this case use feedback.

Transformation of state space model

It sounds like the Question is about forming a feedback loop. In this case use feedback.

etwa 2 Monate ago | 0

Answered

How to do Feedback Loop on Simulink with different frequinces

I'm assuming the question is how to run the same simulation multiple times for different frequencies. With this assumption .... ...

How to do Feedback Loop on Simulink with different frequinces

I'm assuming the question is how to run the same simulation multiple times for different frequencies. With this assumption .... ...

etwa 2 Monate ago | 1

Answered

How to generate all possible vectors where each element can take one of two values

a = [1 2 3]; b = [4 5 6]; n = numel(a); C = mat2cell([a; b],2,ones(1,n)); [D{1:n}] = ndgrid(C{:}); E = sortrows(cell2mat(...

How to generate all possible vectors where each element can take one of two values

a = [1 2 3]; b = [4 5 6]; n = numel(a); C = mat2cell([a; b],2,ones(1,n)); [D{1:n}] = ndgrid(C{:}); E = sortrows(cell2mat(...

etwa 2 Monate ago | 0

| accepted

Answered

how to find the right frequency axis when we take the Fourier transform of a function?

Hi Donya, By default, the frequency variable for fourier in the Symbolic Math Toolbox is in rad/sec. Also, Matlab definition o...

how to find the right frequency axis when we take the Fourier transform of a function?

Hi Donya, By default, the frequency variable for fourier in the Symbolic Math Toolbox is in rad/sec. Also, Matlab definition o...

etwa 2 Monate ago | 2

| accepted

Answered

Pade approximant in Transport delay block

What exactly is the confusion? Increasing the order of the Pade approximant should have no effect on simulation run time or sim...

Pade approximant in Transport delay block

What exactly is the confusion? Increasing the order of the Pade approximant should have no effect on simulation run time or sim...

etwa 2 Monate ago | 0

| accepted

Answered

Discrete values in DFT

Hi Sahil, In general: Let x(t) be a continuous-time signal, i.e., where the inedpendent variable, t, is any real number with -...

Discrete values in DFT

Hi Sahil, In general: Let x(t) be a continuous-time signal, i.e., where the inedpendent variable, t, is any real number with -...

etwa 2 Monate ago | 1

| accepted

Answered

matlabFunction() generating intermediate terms that place the integrand outside integral()

A couple of suggestions on the code. As a general rule IMO, it's best to specify all relevant assumptions on the variables. For...

matlabFunction() generating intermediate terms that place the integrand outside integral()

A couple of suggestions on the code. As a general rule IMO, it's best to specify all relevant assumptions on the variables. For...

etwa 2 Monate ago | 1

| accepted

Answered

help in runge kutta 4 2nd order with establishing the functions

Ok. Let y1 = q and let y2 = qdot (or y2 = q and y1 = qdot if preferred) Then the first equation we need is y1dot = qdot = y2. ...

help in runge kutta 4 2nd order with establishing the functions

Ok. Let y1 = q and let y2 = qdot (or y2 = q and y1 = qdot if preferred) Then the first equation we need is y1dot = qdot = y2. ...

etwa 2 Monate ago | 0

Answered

How to change from scientific form to decimal form using continuous and discrete transfer functions?

Hi Edward, It would be immensely helpful to show a simple example with an actual result and explain what the preferred result w...

How to change from scientific form to decimal form using continuous and discrete transfer functions?

Hi Edward, It would be immensely helpful to show a simple example with an actual result and explain what the preferred result w...

etwa 2 Monate ago | 1

| accepted

Answered

Convert sym to double

Hi @Mark, The first problem with the code is in this area W=zeros(1,len); for i=1:len m=mn{f}(i) W(...

Convert sym to double

Hi @Mark, The first problem with the code is in this area W=zeros(1,len); for i=1:len m=mn{f}(i) W(...

etwa 2 Monate ago | 1

| accepted

Answered

Function solve cannot find explicit solution with 'ReturnConditions'=true but it finds when it is false

Verifying same behavior in 2022a syms t2 t a b ab at bt a2 b2 N x T T0 k assume(N ~= 0 & T ~= 0 & k ~= 0) eq1 = ab == a2*x + ...

Function solve cannot find explicit solution with 'ReturnConditions'=true but it finds when it is false

Verifying same behavior in 2022a syms t2 t a b ab at bt a2 b2 N x T T0 k assume(N ~= 0 & T ~= 0 & k ~= 0) eq1 = ab == a2*x + ...

etwa 2 Monate ago | 0

Answered

simplify function does not work properly

Consider a simpler case syms x y term1 = x - 1; term2 = y - 2; eq = term1*term2 assume(term1*term2 == 0) simplify(eq) sim...

simplify function does not work properly

Consider a simpler case syms x y term1 = x - 1; term2 = y - 2; eq = term1*term2 assume(term1*term2 == 0) simplify(eq) sim...

etwa 2 Monate ago | 0

| accepted

Answered

Closed form not the same as the discrete form

Hi Tworit, I'm not quite following how the code is trying to implement equation 41 from the linked page. Here is one way to cre...

Closed form not the same as the discrete form

Hi Tworit, I'm not quite following how the code is trying to implement equation 41 from the linked page. Here is one way to cre...

etwa 2 Monate ago | 0

| accepted

Answered

Removing all elements from a struct field

Does rmfield meet the need? % create a struct for example for ii=1:13 aap.acq_details.sessions(ii).name = ii; end aap.acq_d...

Removing all elements from a struct field

Does rmfield meet the need? % create a struct for example for ii=1:13 aap.acq_details.sessions(ii).name = ii; end aap.acq_d...

etwa 2 Monate ago | 0

| accepted

Answered

Graphs using ode45 do not look like they should. Why is time vector not a linear set?

Hi Josh, Maybe the plots are deceptive. Running the code exactly as given, except for the plotting, shows that v is the derivat...

Graphs using ode45 do not look like they should. Why is time vector not a linear set?

Hi Josh, Maybe the plots are deceptive. Running the code exactly as given, except for the plotting, shows that v is the derivat...

etwa 2 Monate ago | 0

| accepted