Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB question See the four attached pictures at the bottom. Note that the .csv file is simply the numVal Array table shown on the first

MATLAB question

See the four attached pictures at the bottom. Note that the .csv file is simply the numVal Array table shown on the first image, in Excel. The graphCholSpring2017.m code starts as this:

oneLine = ' '; i=1; numVal = [];

%Open comma-separated file fh = fopen('CholesterolSpring2017.csv', 'r');

%Read in one line at a time and build the numVal array while ~feof(fh) oneLine = fgetl(fh); token = textscan(oneLine,'%d','delimiter', ','); numVal = [numVal token{i}]; end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Define length of x - look at the data file (how many points on each line) % x = 1: length(numVal); %Add title % title('Cholesterol Spring 2017');

%Prompt for the four line colors and styles menu1 = ['Choose one of the following marker styles: ',... ' . dot',... ' o circle',... ... ' h hexagram '];

menu2 = ...

marker1 = input(...); style1 = input(...);

marker2 = ... style2 = ...

marker3 = ... style3 = ...

marker4 = ... style4 = ...

%Prompt for one line width to be used for all 4 lines %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

set(gca,'XTick',1:length(numVal)); set(gca,'XTickLabel',numVal(1,:));

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%On SAME graph, plot Triglycerides, HDL Cholesterol, %VLDL Cholesterol, and LDL Cholesterol %Use both the line color and style as entered by user), %Use marker style according to lab instructions %Marker face colors must be filled in and the same as the line color % %Add a legend in upperright corner

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

As you can see, I am missing A LOT of information in the script. I am extremely confused and have no clue how to solve this. Thank you sincerely for the help...image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

you will use an xy-scatterplot to graph cholesterol data from the file Cholesterol2016.csv (comma delimited file) as follows: Cholesterol Spring 2017 LDL Cholesterol VLDL Cholesterol HDL Cholesterol Triglycerides 100 2007 2011 2012 2013 2014 2016 2010 You will not create a new file but instead download and edit graphCholSpring2017.m to include the above plot, including marker styles. Code has already been provided that reads the data from Cholesterolspring2017.csv and populates the numVal array: numval array 2006 2007 2008 2009 2010 2011 2012 2013 2014 2016 126 120 109 30 33 42 35 291 221 30 33 47 42 43 36 39 33 39 40 44 43 41 149 164 167 209 176 147 110 151 166 236 You should run the file and in MATLAB's workspace window, and click on numVal to verify the above data

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions