close all

D = linspace(0,1,1000); % Duty cycle

N1 = 1;
N2 = 1;
N3 = 1;
% Voltage ratio Vo/Vd in CCM.
VoVd = N3/N2.*D./(1-D);

plot(D, VoVd)
hold on 

xlabel("D"); ylabel("Vo/Vd"); grid on
ylim([0,5])

% Maximum duty cycle, beyond which the core does not have time to
% demagnetize, and thus is not operating in steady-state, leading to
% saturation.
Dmax = 1/(1+N2/N1);

plot(Dmax, N3/N2.*Dmax./(1-Dmax), '*')