How to make an input that can randomly produce +1 and -1 for every second?
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
Hello there,
Just want to know how could I make an input that produces +1 and -1 for every n seconds randomly. Any suggestions for Matlab or Simulink would be appreciated.
Many thanks,
Antworten (3)
Andrew Newell
am 14 Feb. 2011
while true
randint(1)*2-1
pause(n)
end
Sean de Wolski
am 14 Feb. 2011
%For a 1x10 vector
sign(rand(1,10)-.5).*ones(1,10)
Paulo Silva
am 14 Feb. 2011
0 Stimmen
Simulink
|random number (def. set.)|--|gain (10000)|--|saturation (-1 to 1)|-->output
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!