in my code I want to make 1 function that stores all the values of my circuit and in the other function to run simulink simultaion , my questio is simple is there a wat to insert output of function in a new function as input of the function insted of writing those varibles ?
for exmaple this my 1 function
function [U,R,R1,Duty_Cycle,C,R_C,C1,R_C1,L1,R_L1,L2,R_L2,V_diode,f,T] =Simulink_values()
U=12;
R=100;
R1=0.1;
Duty_Cycle=50;
C=1000e-6;
R_C=eps;
C1=820e-6;
R_C1=eps;
L1=330e-6;
R_L1=eps;
L2=330e-6;
R_L2=eps;
V_diode=eps;
f=18e3;
T=1/f;
end
and in my second function to write like this :
[t,I_C1] = simulink_results(Simulink_values);
insted of wrting like this :
[t,I_C1] = simulink_results(U,R,R1,Duty_Cycle,C,R_C,C1,R_C1,L1,R_L1,L2,R_L2,V_diode,f,T);
0 Comments
Sign in to comment.