Respondida
Im solving for the EOM of a 3 DOF vibrations problem with ode 45 and am having trouble getting the indices to agree when I try to store the equations in my ydot term.
Hi @CARSON KATZ Should be working now. However, it is observed that your stiffness matrix is a Tridiagonal matrix, while your ...

más de 4 años hace | 1

| aceptada

Respondida
Tuning PID using GA for multiple plants
Hi @SM For multiobjective optimization, then you should consider using this gamultiobj() command. https://www.mathworks.com/he...

más de 4 años hace | 1

| aceptada

Respondida
How to convert SDOF system to MDOF system of Nonlinear Dynamic analysis of a building
@Chaudhary P Patel I'm not a certified Building Dynamicist. But if the equations of motion of a 4-storey building can described...

más de 4 años hace | 0

Respondida
Output a plot and a matrix from a function
Hi @Miranda Gabriel Remove the semicolon ";" in this line should produce mymatrix on the Command Window. mymatrix = [locs(:), ...

más de 4 años hace | 0

Respondida
I want to plot an implicit equation
Hi @mohd ayaz I tried to plot this way to first visualize how the curve looks like for the positive part of . Qm = linspace(-1...

más de 4 años hace | 1

Respondida
How to deal with the time response of first order system?
@Cola, let's correct your Simulink model first. The ODE is given by which can be rearranged into Integrating both sides a...

más de 4 años hace | 2

| aceptada

Respondida
Plotting streamlines in an unsteady flow given vector field equation
@Kiat Tsen Lim Since it involves the time dimension, I think you will need to use the quiver3() function. https://www.mathwork...

más de 4 años hace | 1

| aceptada

Respondida
How can I create a function with several summations and Kronecker delta symbol in two dimension?
@matlab beginner Have you tried this kroneckerDelta() function? https://www.mathworks.com/help/symbolic/sym.kroneckerdelta.htm...

más de 4 años hace | 1

Respondida
Sigma-delta ADC under simscape
@Peter Balazovic Found an example model here. Do you think you can remodel it with the Simscape blocks? https://www.mathworks....

más de 4 años hace | 0

Respondida
Create a long rectangular signal with a function handle
@AEW Second opinion! fcn = @(t) (sign(sin(2*pi*t)) + 1)/2; ezplot(fcn, 0, 5)

más de 4 años hace | 1

Respondida
ode return NaN :(
Hi @ZH CC The odeToVectorField(eqn) returns this V = ...

más de 4 años hace | 1

| aceptada

Respondida
plotting, no graph appears
@Patrick Monst Because you forgot the 'dot' when dividing corresponding elements in the x vector. x = 0:0.01:1; y = (0.5*(1-x...

más de 4 años hace | 0

Respondida
given the aeeay of angles an = pi/n,n=2,3,...,9.generete a script that computes cos an and display the results as
@Mrunal Shah If you don't want to use the For loop approach, then try this: n = 2:1:9 A = [n; cos(pi./n)]; fprintf('%s %10s\...

más de 4 años hace | 0

Respondida
How do i get a direction field plot?
Hi @Tuân Nguyen Because there are two equilibrium points and , I think it should look like this. [T, P] = meshgrid(0:6e3/14:6...

más de 4 años hace | 2

| aceptada

Respondida
How to design PI controllers within Maltab?
Hi @Kyle Ramphal If the result from the PID Tuner app can be admitted as the design solution, then just do so to directly obtai...

más de 4 años hace | 1

| aceptada

Respondida
How to solve and graph a second order nonlinear differential equation?
Hi @Parcher Not exactly sure what you are tring to solve, but this worth a try, although it may not be the exact solution that ...

más de 4 años hace | 0

Respondida
How to solve an equation with two variables?
@Enver Kocaman The surface has singularities because there are conditions that cause , (division-by-zero). The surface shows a...

más de 4 años hace | 0

Respondida
How to add my IQ samples in Simulink as input data?
Hi @raya alhajri You can load data from MAT file into Simulink model using the "From File" Block directly: https://www.mathwor...

más de 4 años hace | 0

Respondida
how to collect similar equation and find all of them
@wlat hamad Have you checked if the collect() function works for your case? https://www.mathworks.com/help/symbolic/sym.collec...

más de 4 años hace | 1

| aceptada

Respondida
Print value of correlation to a plot displaying two functions
@Loriann Chevalier Perhaps like this? v = corr(y1,y2,'Type','Kendall'); txt = ['Corr = ', num2str(v)]; text(4, 0.5, txt)

más de 4 años hace | 0

Respondida
How to do an elimination procedure to represent the solution (matrix)
Can you show the slides and elimination formulas? Otherwise, I think this elimination procedure: A = [1 -2 1; 0 2 -8; ...

más de 4 años hace | 2

| aceptada

Respondida
How to plot two vectors at the same time
@Jonas Morgner, Do you mean llke this? v1 = [1 -2 -5 6]; v2 = -100 : .1 : 100; y = polyval(v1, v2); plot(v2, y)

más de 4 años hace | 2

| aceptada

Respondida
In the fraction formed by the symbolic variable "s", the coefficient is too large and shows as “Inf”, which cannot separate the numerator and denominator. How to simplify it?
@梦雪 王, Have you tried this? sympref('FloatingPointOutput', true) It should display the expression in floating-point format.

más de 4 años hace | 1

Respondida
Using ‘surf’ plot the surface f (x, y) =x(x^2+y^2).
I guess it's here: z=x.*(x.^2 + y.^2);

más de 4 años hace | 1

Respondida
Evaluate the expression 𝑦 = 4𝑥3 + 6𝑥2 + 𝑥 + 1 using MATLAB for 𝑥 = 2.
@Muhammad Kashif This is very strictly based how you displayed the equation. x = 2; y = 4*x*3 + 6*x*2 + x + 1 Mostly likel...

más de 4 años hace | 0

Respondida
Evaluate (3-4i)(-4+3i) in MATLAB.
@Muhammad Kashif You will need a Alphanumeric Keyboard lets the user type in Latin alphabet, numeric characters, and mathemati...

más de 4 años hace | 1

Respondida
Problem with designing MPC
Hi @Marcin Pilzak Because you need to have the MPC object in the Workspace. And this is how you create a basic one: Plant = tf...

más de 4 años hace | 0

Respondida
How to find steady state solution of recatti equation
@shahin sharafi You can find the solution for x with the Implicit algebraic Riccati equation solver: [X, K, L] = icare(A_Star,...

más de 4 años hace | 0

Respondida
how to save variables in a for loop
@ADNAN KIRAL for x =1:5 y(x) = x*x; end disp(y)

más de 4 años hace | 1

| aceptada

Respondida
How to calculate rise time, settling time, and overshoot based on real data measurements
Hi @Konvictus177 The rise time, settling time, and percentage overshoot can directly obtained from measured step response data....

más de 4 años hace | 1

| aceptada

Cargar más