Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please do all parts in matlab, thank you! 2- (25 Points) Script 1/0. You must make a single script flile that contains commands for all
please do all parts in matlab, thank you!
2- (25 Points) Script 1/0. You must make a single script flile that contains commands for all sub-questions (from i to v). Create a 2-dimensional plot of a wave after obtain wave type (sine or cosine), and line color from the user. 1. (3 Points) Using the mene convermas, wnite a lise code thar acis the viser (vis 6ui) which wave to plos "sin" or "cos", and suest the selotion in variatic mection. i. (3 Toints) Construct a 122 string matra wwo where the string "sine" is the first element and the sring "coine" in the second elment? iii. (3 Points) Write a comenand that asks wer so eeter color for plot, that only accepts string inpot, and swes the answer in variable celoc. W. (5 Points) Use fprintf to dicplay the followins intence with your thoices of wave You choose to plot a (ulise or catinef wwe in (color) For eatingle, You choese to plot a cosine wave in blue v. (10 Paints) Create 2 -dirmernional line plot of yas f: f: from 2 ter to 2 with 0.1s spaing y=5 in (t) or 5 cos (t) dependine on vour chicice of wave selection. - Line type is solid line, maker is "*. - Uine in calor vou selected from in. Do not eend te une the varlatle color. - Adjust xamir -2ar to 2 - Add a title ( Wave Line ) - Add avis labeh (x-wicict t y aris:y ) - Gridon Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started