Answered
How can my code, which collects bad data with 'cellfun' and 'try, catch', be improved?
Have func() return a logical with true indicating the file is bad and false indicating the file is good. In this case we'd have...

23 days ago | 0

| accepted

Answered
How to ROUND the elements of cell array?
% example data rng(100) child.x ={rand(1,3)}; format long child.x round(child.x{1},3)

23 days ago | 0

| accepted

Answered
Avoid slprj folder and slxc files
Possibly can be done via Simulink preferences. Try this doc page, particularly the section on "Folders for Generated Files."

23 days ago | 0

Answered
Functions only plotting out to x=5
fplot doesn't take t as the first argument as would have to be done for plot. Actually, I guess it can, but it's superfluous. In...

23 days ago | 0

Answered
Huge difference between the result of fft function Matlab and analytical Fourier transform of the same function
Can't say for sure w/o seeing the code, but I supsect the fftshifted curve will be close to the blue curve if you mulitply the f...

24 days ago | 0

| accepted

Answered
How should I plot the function (sqrt(1 + x) - 1) / x using the values x = 0.1, 0.01, 0.001, ..., 10^-20?
Hi Jackson, If you want x to from -1 to -20 you have to put the stride of -1 in the colon operator, otherwise it uses the defau...

24 days ago | 0

Answered
i am trying to get the value of u_E using the equation, but matlab says it has error in that line which has the equation.
Hi kaixi %creat symbol for axial force, length, thickness, displacemnent and width syms f l t d w %define governing equations...

24 days ago | 0

Answered
Need help understanding where to use the . when writing equations.
HI Mark, The . (dot) is part of the symbol for the operator. In other words. .* is a two-symbol notation for the operator that ...

24 days ago | 0

Answered
Linearization of Non Linear with the editor
Hi Hamza, The code will run after fixing a few things, mostily mismatched dimensions. All I did was get it to run; did not chec...

24 days ago | 0

Answered
Fourier transform of symbolic function
Hi soup, The Fourier transform of x is syms t w; x=sin(2*t); fourier(x) fplot() ignores Dirac delta functions. Because ther...

25 days ago | 0

| accepted

Answered
Plotting natural frequency, 0 input, developing transfer function
Hi Brent, The modeling equation as stated does not include a forcing input, so there is no transfer fucntion to speak of. If we...

26 days ago | 0

Answered
How to change the transfer function variable in simulink during simulation time
Hi Swasthik, If I understand correctly, the R and C values are changing dynamically. Just use blocks (integrators, subtraction,...

27 days ago | 0

Answered
I need to model this equation in simulink.
Assuming the Qeustion is about specific values of t and Ts, i.e., integrate a signal over an interval .... Put the integrator i...

27 days ago | 0

Answered
How do we modify the tails of norrmal/any kind of distribution by keeping other portion is same?
Hard to say much, at least for me, without knowing more details about the starting PDF and how the tails are going to be modifie...

27 days ago | 0

| accepted

Answered
Reconstructed Pulse Out of Phase
Hi Doug, I think the short answer is, don't use nextpow2. Fs = 100; %Sampling Frequency t = -0.5:1/Fs:0.5; %Time Vecto...

28 days ago | 0

| accepted

Answered
'dare' command from Control toolbox doesn't work in the Simulink's 'Matlab Function' block
In the Matlab Function block, declare dare with coder.extrinsic. See this doc page

29 days ago | 0

Answered
linear independent set formation
A set of functions fi(t) is linearly indepenedent if the only solution to a1*f1(t) + a2*f2(t) .... an*fn(t) = 0 (1) is ai = 0 ...

29 days ago | 0

Answered
Triggering Simulink simulation through GUI does not send data from simulink to workspace.
Hi Amartya, Does this answer help?

29 days ago | 0

Answered
sim command in Matlab and ToWorkspace in SIMULINK dont work togheter?
Hi Benjamin, Specify an ouput argument for the sim command, like so: ouputdata = sim('mymodel'); All of the ToWorkspace block...

29 days ago | 0

| accepted

Answered
How to use the values of an array as inputs for a function?
Assuming the function resturns a scalar .... Will a simple loop suffice? c = num2cell(rand(10,6)); y = zeros(size(c,1),1); f...

30 days ago | 1

Answered
How to create a vector in simulink? I have given an input which has 2 values, one is flow and another is temperature. I don't know how to simulate this model, Kindly, help me
Vector signals are commonly created in one of two ways. Define the parameters of any source block such that it ouputs a vector ...

30 days ago | 0

Answered
Plotting the convolution of u(t) * dirac(t)
Hi Jeremy, The equation for the convolution integral in the Question is incorrect. The argument of u inside the integral should...

1 month ago | 1

Answered
exp( ) gives unexpected answer for (2,2) input
Seems to give the expected result? a= [1.4142 1.4121; 1.4142 1.4121] exp(j*2*pi*a*10^3)

1 month ago | 0

Answered
Hi all,I want to use matlab to calculate the exponential integral,I know that the official function ExpIntegralE in Mathematica can calculate it.
ExpIntegralE in Mathematica seems to be the same as the two-argument form of expint in the Symbolic Math Toolbox.

1 month ago | 0

| accepted

Answered
How do I take the average of elements of a vector depending on the values of another vector?
This common workflow is discussed here: splitapply A = [2 3 2 2 3 4 3 3]; B = [0.1 0.2 0.22 0.13 0.07 0.88 0.3 0.5]; [G,ID]=f...

1 month ago | 0

Question


filtfilt Does Not Perform Zero-Phase Filtering. Does It Matter?
The doc page for filtfilt claims that the function "performs zero-phase digital filtering" and then goes on to describe the expe...

1 month ago | 1 answer | 0

1

answer

Answered
Using root function to complete the turning point function that solves the derivates of a polynomial
Hi Laidog, I suggest starting with this doc page. It will show how to reperesent and analyze polynomials in Matlab and contains...

1 month ago | 0

Answered
Sum of series (symsum) in Simulink
I was able to get a workable soluion using only Simulink blocks by setting up the equation and solving for mu with an Algebraic ...

1 month ago | 0

| accepted

Answered
Solution of differential equation
Simulink provides many optiions for exporting simulation data to the Matlab workspace, after which one can anlayze it, process i...

1 month ago | 0

Load more