Risposto
How to fix errors within double integral.
Hi @Amanda, The doc page for integral2 say that the function that defines the integrand "must accept two arrays of the same siz...

circa 4 anni fa | 0

| accettato

Risposto
Having trouble with nonpolynomial equation systems
Equations 1, 2, 5, and 6 can be solved for a parametric solution under some (I hope) reasonable asumptions on the variables. I c...

circa 4 anni fa | 0

Risposto
Signal dimensions inside a simulink function
Based on the error message, it sounds like you'e requried to specify the dimensions of that outport. Do you know what the dimens...

circa 4 anni fa | 0

Risposto
Can anyone help understand what the blocks in this figure are and where to find them in Simulink library?
Assuming these are both from Simulink library. 1. Double click on the block. The BlockType will be at the top of the resultsing...

circa 4 anni fa | 0

Risposto
location of second peaks in fft
Hi peter, The elements of the output of fft as implemented in Matlab correspond to angles around the unit circle. For an N-poin...

circa 4 anni fa | 0

| accettato

Risposto
integral of two added function can't be implemented
Hi Faisal, If the plot for the answer to Q4 is corret, then does the integration really need to start from -inf? However, I su...

circa 4 anni fa | 0

Risposto
Symbolic dependency apparently sometimes gives wrong answers
Hi Mohammad, This works, at least for the examples cited in this comment. Haven't tested for anything but those examples. syms...

circa 4 anni fa | 0

Risposto
how to find the area between sinx and sin2x with plot on range [0,pi] as from this code its giving negative area,?
Hi Aashay, After commenting out the code for pos and negArea that wouldn't run because y is not defined (and even if was define...

circa 4 anni fa | 0

| accettato

Domanda


Should ztrans Work Better when Using heaviside() ?
Recently ran across peculiar behavior with ztrans. Define some variables syms n integer syms T positive Set sympref so that ...

circa 4 anni fa | 0 risposte | 0

0

risposte

Risposto
how to make a sum of squares symbollically known to MATLAB for use in simplification
Hi Michael, simplify works for this case: syms a b c d x y z f = (a) * (b) * (c) * (1- x^2 - y^2 - z^2) * (d) assume(1 - x^...

circa 4 anni fa | 0

Risposto
eigenvalue diagonalization in matlab
Does eig not provide the solution, assuming a solution exists?

circa 4 anni fa | 0

Risposto
Measure Phase/Gain Margin from a different phase reference using margin()?
Hi Alex, I'd look at the problem as follows syms s T0 = sym(-97.74e3); % T0, the DC loop transmission f0 = sym(5); %...

circa 4 anni fa | 0

| accettato

Risposto
How to get max of repeated values?
Can use splitapply C = [0.5000 0.5000 0.3000 1.0000 0.8000 0.3000 0.7000 0.7000 0.3000 0.4000 ...

circa 4 anni fa | 0

Risposto
Getting Simulink compile-time error "Grid inputs must be vectors or the output of MESHGRID" even though I don't get that error when I try testing those lines in MATLAB
That's an odd error message insofar as interpn actually requires the the grid inputs to be the output of NDGRID (not MESHGRID) a...

circa 4 anni fa | 0

Risposto
How to output a vector in MATLAB Function in Simulink?
One problem that I should have seen before is that this line [xdot_3,xdot_4] = Minv * [same stuff here]; should be temp = M_t...

circa 4 anni fa | 0

Risposto
string extraction from a table
Age = [38;43;38;40;49;45;42;24;50;99]; Smoker = logical([1;0;1;0;1;1;1;0;0;1]); LastName = {'Brown_Howard';'Johnson';'Lee';'Di...

circa 4 anni fa | 0

| accettato

Domanda


Are Arithmetic Operations on a Cell Array of sym Objects Documented Behavior?
I inadvertently stumbled across this behavior: syms z H(z) = 1/(z+1) - 1/(z+2) c = children(H(z)) whos c c is a cell array ...

circa 4 anni fa | 0 risposte | 2

0

risposte

Risposto
Simulink signal is double when it should be logical.
Hi Sam, Set the initial condition of the Delay block (or Unit Delay block, not sure which is being used) to false or true as de...

circa 4 anni fa | 0

| accettato

Risposto
Displaying sum on plot
Use text rng(100) x = rand(10,1); % some data plot(x) text(1,.1,"Sum = " + string(sum(x))) Modify as needed

circa 4 anni fa | 0

| accettato

Risposto
Graphing Fourier magnitude and phase spectra using fft, error: Array indices must be positive integers or logical values.
Hi Luke, At the line in question, we see that x(t) is non-integer numeric value, which can't be used to index into the array ff...

circa 4 anni fa | 0

Risposto
matrix math problems , error in matrix size
Hard to say without without knowing anything about the data in the question. Based on the wording it should work as follows A =...

circa 4 anni fa | 0

| accettato

Risposto
Creating a Closed loop transfer function of a model
Hi Jacob, Perhaps a clue is that the code doesn't use loop1 after it's computed. Once you have loop1, how does it relate to G2 ...

circa 4 anni fa | 0

| accettato

Risposto
How to solve a non-linear system of differential equations?
Hi Pacao, The missing step is a call to odeToVectorField before the call to matlabFunction. Check that first doc page and then ...

circa 4 anni fa | 0

Risposto
Systems with two different execution rates
Hi Samy, Are you intending to have one model reference the other via a Model block? If so, and if you have at least R2022a, I ...

circa 4 anni fa | 1

Risposto
Calling the vectorized Matlab fcn from within Simulink
Use a Matlab Function block in the Simulink model and call your function from inside that block. If your function is not amenabl...

circa 4 anni fa | 0

| accettato

Risposto
Generating numbers following a lognormal distribution within a specific interval
Hi Behrooz, Shouldn't the relationship be the log of the mean of samples is equal to mu + sigma^2/2 ? In any case, why would t...

circa 4 anni fa | 0

Risposto
Inconsistency of the figure and value on the curve
Hi @M The equation for Dcdenominator is not properly vectorized. In one spot it uses /, which should be ./ % was % Dcdenom...

circa 4 anni fa | 0

| accettato

Risposto
Problem using symbolic sinc?
We can get rid of the vertical asymptote with: syms x y w F A = 1; tau = 1; F = A*tau*sinc(w/(2*pi)*tau); figure fplot(abs...

circa 4 anni fa | 0

| accettato

Risposto
Mixture of 2 salts + Dirac
Hi Adrielli, Why is Ain defined and then redefined? Is that correct? What is the role of the x and y variables in this problem...

circa 4 anni fa | 1

| accettato

Risposto
How to create a transfer function with no simplification ?
I'm almost certain that this can't be done in the CST. If just wanted for display purposes you'd have to write your own code, bu...

circa 4 anni fa | 1

Carica altro