Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(MATLAB QUESTION) How to modify this function? function [ ] = csvio( filename ) %Enter code/comments here end ** I have uploaded the .csv files

image text in transcribedimage text in transcribedimage text in transcribed

(MATLAB QUESTION) How to modify this function?

function [ ] = csvio( filename ) %Enter code/comments here end

** I have uploaded the .csv files in case it needs here. **

.6 csvio.m Modify csvio.m so that the function reads in a .csv file containing the identification number and three (3) quiz scores for a collection of n students and computes a n x 1 vector of each student's average Write the identification numbers, quiz grades, and averages back to the file filename Csvio.cSv data = zeros ( randi ( 10 ) + 5 , ); data ( : , 2 : 4 ) = randi ( 75 , 312e( data , 1 ) , 3 ) + 25; data( : , 1 ) = randi ( 89999 , 312e( data , 1 ) , 1 ) + 9999; csvwriter tilename , data ): csvio( filename newData-csvread filename ys linspace (0,1 , size ( data ,1) + 1); ys = flip1r ( ys ( 1 : size ( data , 1 ) ) ); for i-1 : size ( data , 1 ) uicontrol ( 'style' 'text ' 'units' 'normalized' , , , , fontunits',"normalized', 'fontname', 'fixedwidth',.. . 'string' , sprint f( '%d %d %d %d % .2 f ' , newData( i , 1 ) , newData( , 2 ) , newData ( i , 3 ) , newData( 1 , 4 ) , newData( i , 5)); end ipboard F Font Alignment 14740 53 76406 34220 47 27 51 97 95 59307 47596 57 CSVIO ea .6 csvio.m Modify csvio.m so that the function reads in a .csv file containing the identification number and three (3) quiz scores for a collection of n students and computes a n x 1 vector of each student's average Write the identification numbers, quiz grades, and averages back to the file filename Csvio.cSv data = zeros ( randi ( 10 ) + 5 , ); data ( : , 2 : 4 ) = randi ( 75 , 312e( data , 1 ) , 3 ) + 25; data( : , 1 ) = randi ( 89999 , 312e( data , 1 ) , 1 ) + 9999; csvwriter tilename , data ): csvio( filename newData-csvread filename ys linspace (0,1 , size ( data ,1) + 1); ys = flip1r ( ys ( 1 : size ( data , 1 ) ) ); for i-1 : size ( data , 1 ) uicontrol ( 'style' 'text ' 'units' 'normalized' , , , , fontunits',"normalized', 'fontname', 'fixedwidth',.. . 'string' , sprint f( '%d %d %d %d % .2 f ' , newData( i , 1 ) , newData( , 2 ) , newData ( i , 3 ) , newData( 1 , 4 ) , newData( i , 5)); end ipboard F Font Alignment 14740 53 76406 34220 47 27 51 97 95 59307 47596 57 CSVIO ea

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions