Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. It obviously won't work since I didn't give you the data file but you can still write the script (matlab says its (229x9). I
1. It obviously won't work since I didn't give you the data file but you can still write the script (matlab says its (229x9). I just can't figure out the for loop so I would appreciate some help with the code. Thaks!
Start a new script and copy the first lines from AddNoiseData.m (the ones that read in the data and create the string arrays that say what the column headers are and provide colors for the plot). o Run and make sure that you are reading data correctly-what size is dataN? . Plot one column of data ColData-dataNe 1); % Gets the first column of the data o What happens if you just plot it? Try plotting it with markers... o You want sort ( Sort the data and plot it. In this case you don't need to make a dependent variable t. You can just call plot colData, -b') and it will default to plotting 0, 1, 2, etc Wrap the code for the bit above in a for loop in order to plot all of the columns o Remember that sizeldataN, 2 ) will give you the number of columns to plot over o Remember to change 1 to your loop index variable Start a new script and copy the first lines from AddNoiseData.m (the ones that read in the data and create the string arrays that say what the column headers are and provide colors for the plot). o Run and make sure that you are reading data correctly-what size is dataN? . Plot one column of data ColData-dataNe 1); % Gets the first column of the data o What happens if you just plot it? Try plotting it with markers... o You want sort ( Sort the data and plot it. In this case you don't need to make a dependent variable t. You can just call plot colData, -b') and it will default to plotting 0, 1, 2, etc Wrap the code for the bit above in a for loop in order to plot all of the columns o Remember that sizeldataN, 2 ) will give you the number of columns to plot over o Remember to change 1 to your loop index variable
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