How to compute values using for loop then depending on time interval we plot the output?
1 view (last 30 days)
Dear Matlab comunity.
I hope this post finds you well.
My problem is as the following
I have two input values (0,1), where the output is strictly attached to them.
for a t=0 to Tfin, the output would be 0 unless for some designated time interval calculated.
I hope I explained well, I am not good in that and my English is a bit at a biginner level.
The result should be like the one in the picture
The code is as follow ( it is not finished yet)
omega=1000 %rotation frequency (rpm)
omega_rad=(omega*2*pi)/60 %rotation frequency (rad/s)
TRot=(360*(pi/180))/omega_rad %Time of one rotation
Holes=15 %Number of holes in Cylinder
Pressure_In1=0 %Pressure Amplitude in Bar
Pressure_In2=1 %Pressure Amplitude in Bar
alpha=360/Holes %angles between holes (degree)
beta=11.20 %angles swept by 1 hole (degree)
alpha_rad=alpha*(pi/180) %angles between holes (rad)
beta_rad=beta*(pi/180) %angles swept by 1 hole (rad)