how to see t in ode function

1 Ansicht (letzte 30 Tage)
tomer polsky
tomer polsky am 1 Jan. 2018
Kommentiert: Walter Roberson am 1 Jan. 2018
hello i am using ode command but I cant see the output t , for exmaple i want to see how variable t is displaying in the command window
function [ zigzag_simulation] = find_zigzag( t,x)
global R R1 C C1 L1 L2 U Duty_cycle alpha R_C R2 R_C1 V_diode R_diode
global A_T B_T C_T D_T V_desire f tspan
global A_a A_b B_a B_b
zigzag_simulation=disp(t)
end

Antworten (1)

Walter Roberson
Walter Roberson am 1 Jan. 2018
function [ zigzag_simulation] = find_zigzag( t,x)
global R R1 C C1 L1 L2 U Duty_cycle alpha R_C R2 R_C1 V_diode R_diode
global A_T B_T C_T D_T V_desire f tspan
global A_a A_b B_a B_b
disp(t)
zigzag_simulation = rem(t, 1/f);
end
  2 Kommentare
tomer polsky
tomer polsky am 1 Jan. 2018
thank you for your help but i tried this allready and i get this eror :
>> zigzag_simulation Not enough input arguments.
Error in zigzag_simulation (line 25)
disp(t)
Walter Roberson
Walter Roberson am 1 Jan. 2018
We need to see your zigzag_simulation code, especially the ode45 call.

Melden Sie sich an, um zu kommentieren.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by