Plotting two functions that depend on boundary conditions.
Show older comments
I have two functions,
V_lamp_off(t)=Vs+(Voff-Vs)*y and V_lamp_on(t)=Vth+(Von-Vth)*exp(z). I want to plot V_lamp_off when the value is between 1 and 4 and plot V_lamp_on when the value is between 4 and 1. The length of the plot is driven by t. I can plot the two functions individually but want to show the shark tooth wave form. I've tried an if/then sequence with no luck.
if V_lamp_off <= Voff
then a = V_lamp_off;
elseif V_lamp_off >= Von
then a = V_lamp_on;
elseif V_lamp_on <= Voff
then a =V_lamp_off;
end
plot (t,a)
Any help would be appreciated.
1 Comment
madhan ravi
on 18 Nov 2018
upload your full code with the required datas
Accepted Answer
More Answers (3)
Categories
Find more on Labels and Styling in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!