Risposto
Discrete input signal and continuous transfer function
Not sure what the issue was with lsim without seeing the code. Is the transfer function contiuous time, e.g. a model of an anal...

circa 4 anni fa | 0

Risposto
how to replace a symbolic variable with a real one after computation?
Use subs or symfun objects and covert to double are two options syms I3 I4 d = I3 + I4; double(subs(d,[I3 I4],[1.1 2.2])) d(...

circa 4 anni fa | 0

| accettato

Risposto
sinc function doesnt work...
The code runs fine here. clear all close all clc T=0.1; A=1; tau=T/2; kmax=20; t0=tau/2; %% f0=1/T; t=(0:0.0001:1)*5*...

circa 4 anni fa | 0

Risposto
Find source of stopped simulation in Simulink
Hi Stefan, If you use the sim command, then the output has some useful information. For example, I used a model with a Clock, f...

circa 4 anni fa | 0

| accettato

Risposto
Bode Plot options to graph
Can be done if using bodeplot instead of bode H = tf([1 0.1 7.5],[1 0.12 9 0 0]); h = bodeplot(H); setoptions(h,'MagUnits','a...

circa 4 anni fa | 0

Risposto
How to skip many vectors in a legend?
Something like this, but with different data simulation = rand(100,20); average = mean(simulation,2); analytical = 0*average+...

circa 4 anni fa | 1

| accettato

Risposto
3D plot of sum series, error in symsum fuction
Hi grisham, The function symsum can only be used with symbolic inputs, as created by syms for example. However, the code has no...

circa 4 anni fa | 0

Risposto
How to you put sin function in Simulink
Feed the output of a Clock into a Gain of 1/2. Feed the touput of that gain into a Trigonmetric Function block, select the cos o...

circa 4 anni fa | 0

| accettato

Risposto
in the histogram function using "Normalization", "cdf" to draw out the histogram and cdf does not match, the end of histogram doesn't reach "1"
Are there any NaNs (or something similar) in uk.icu_patients? It seems that histogram and cdfplot treat NaNs differently x = r...

circa 4 anni fa | 1

| accettato

Risposto
Phase gradient in fft
Hi Jiayun, First of all, I don't see anything in the code that does "zero-padding." That term typically refers to augmenting a ...

circa 4 anni fa | 0

| accettato

Risposto
gfdeconv implementation in Simulink
If gfdeconv is not supported for code generation (it appears not to be as there is no "Extended Capabiliites" section on its doc...

circa 4 anni fa | 1

Risposto
What is the reason why Simulink does not display numbers when I enter decimals for block parametric values?
Click/hold on a corner of the block and stretch it until the numerator and denominator polynomials are displayed.

circa 4 anni fa | 0

Risposto
Question about eigen-vector compute value
"I need to compute the eigevector belonging to the maximum eigen value." Why is SVD being used? Just use eig? o=eye(3); z=zer...

circa 4 anni fa | 0

Risposto
Turn cell array including space (i.e, ' ') into string
cell_arr = [{'c'} {'a'} {'s'} {'t'} {' '} {'m'} {'e'} {'m'} {'b'} {'e'} {'r'} {'s'}]; If a sti...

circa 4 anni fa | 1

| accettato

Risposto
How to operate block matrices?
One can always store block matrices in cell arrays and then roll code to implement the block matrix algebra. Maybe there is a su...

circa 4 anni fa | 1

Risposto
How to plot shaded rectangles?
One option is rectangle. Can make the color whatever you want, but not transparent t = 0:.01:1; plot(t,sin(10*t)) grid r = r...

circa 4 anni fa | 2

| accettato

Risposto
Using conv() function
h, x, and u are actually functions that are evaluated at the values of their input arguments. So need to evaluate h and x at the...

circa 4 anni fa | 0

Risposto
string to array and then getting the first value of the array
It's just solid(1)

circa 4 anni fa | 0

| accettato

Risposto
Linear equations with three unknowns
Hi Ahmed, The problem in the Question is ill-defined becasue there are no values of (x,y,z) that satisfy all four equations. ...

circa 4 anni fa | 0

Risposto
what is this simulink's block?
Double click on the block. The very top of the dialog window that opens should say "Block Parameters: BlockType" where BlockTyp...

circa 4 anni fa | 0

Risposto
Problem in creating stimulink for a tranfer function
Can't be done. If the block in question is followed (or preceded) by another block of an LTI system, then you can combine them ...

circa 4 anni fa | 0

Risposto
Creating a log probability plot for particle size distribution
Using same example data as above ... x1 = wblrnd(3,3,[500,1]); figure probplot('weibull',x1) grid set(gca,'XDir','reverse')...

circa 4 anni fa | 0

Risposto
How to plot the convolution integral of two functions
Hi Anthony, When using conv to compute a convolution sum to approximate a convolution integral of two signals (not two integral...

circa 4 anni fa | 1

| accettato

Risposto
Problem seen in discrete transfer function with varable z^-1, when calc ztrans of x(n)=n*u(n)
Code works exactly as advertised u = @(n) heaviside(n) ; % change function name syms n x(n)=n*u(n) X1=ztrans(x) [num, den...

circa 4 anni fa | 2

| accettato

Risposto
convolution of signals using matlab
Hi Jiby, With respect to part b), you may want to consider: b) In linear systems analysis, we often use convolution to apply a...

circa 4 anni fa | 0

Risposto
How to randomize simulation seed in simulink?
Hi Amr, When I first saw the question, I was quite surprised. To my uderstanding, the call to pearsrnd in the Matlab Function b...

circa 4 anni fa | 2

Risposto
Convolution of a gaussian and an exponential
Are all of the parameters in the problem real? If so, then asserting them as such yields a simpler result. syms I0 E E0 s N0 a...

circa 4 anni fa | 0

Risposto
Using subs() in a function when symbolic variables defined in another function
Making F into a symfun seems to work .... F = getJacobian valueF = someRandomFunc(F) function myJacobian = getJacobian() ...

circa 4 anni fa | 1

| accettato

Risposto
impulse response ode45 help
Hi 9times6, Numerical integration schemes like ode45 don't really work for Dirac delta functions. One option is to compute the...

circa 4 anni fa | 2

Risposto
Help Making a Piecewise Function Periodic
HI Connor, Something like this? syms t real z(t) = piecewise(0 <= t <= 1,t, 1 < t <= 2.5, exp(-5*(t-1)),0); fplot(z(t),[-2 1...

circa 4 anni fa | 2

| accettato

Carica altro