How to get matlab codes into Simulink ??
Show older comments
The following code has been written by me and it is giving my result in Matlab. Can you tell how to use this code in Simulink so that I can give this as input to my switch.??
numpulses=10;
Pcell=cell(1,numpulses);
dt=.000000001;
for i=1:numpulses
T=.00000383*randn+.00000526;
W=2*T/3;
t=0:dt:T;
Pcell{i}=(t<=W);
end
pulse=[Pcell{:}];
t=(0:length(pulse)-1)*dt;
plot(t,pulse) ;
ylim([-1 2])
end
Accepted Answer
More Answers (0)
Categories
Find more on Signal Import and Export 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!