Insights Blog
-- Browse All Articles --
Physics Articles
Physics Tutorials
Physics Guides
Physics FAQ
Math Articles
Math Tutorials
Math Guides
Math FAQ
Education Articles
Education Guides
Bio/Chem Articles
Technology Guides
Computer Science Tutorials
Forums
Intro Physics Homework Help
Advanced Physics Homework Help
Precalculus Homework Help
Calculus Homework Help
Bio/Chem Homework Help
Engineering Homework Help
Trending
Featured Threads
Log in
Register
What's new
Search
Search
Search titles only
By:
Intro Physics Homework Help
Advanced Physics Homework Help
Precalculus Homework Help
Calculus Homework Help
Bio/Chem Homework Help
Engineering Homework Help
Menu
Log in
Register
Navigation
More options
Contact us
Close Menu
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Homework Help
Engineering and Comp Sci Homework Help
Matlab, for loop, sawtooth function
Reply to thread
Message
[QUOTE="mp252, post: 3619287, member: 131033"] [b]1.Hi! i am having problems plotting a sawtooth waveform without the use of the sawtooth function in matlab. I am required to produce a sawtooth waveform with a duty cycle of 30% using nested loops (for loop within a for loop) i have managed to get the ramp function from one, for loop,therefore it is a unit step, however i cannot manage to get the waveform to come down at 30%. I need to know how to create another for loop within the for loop to bring it down at 30%. Any help out there? I even tried to use an if statement but this did nothing. I managed to get another vector in there but it was wrong. [b]3. %SAWTOOTH WAVE PLOT y=0:0.2:1 for j=0:0.2:1 a=(j)+y end figure(1) plot(a,y)[/b][/b] [/QUOTE]
Insert quotes…
Post reply
Forums
Homework Help
Engineering and Comp Sci Homework Help
Matlab, for loop, sawtooth function
Back
Top