ABCs_HighLevelFileIO - csvwrite(csv2,csvArr); c % c)...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function [csvArr dlmArr] = ABCs_HighLevelFileIO(csv1, csv2, dlm1, dlm2) % ABCs of High Level File I/O % % This is a multi-part problem. Do each of the parts below. % % DO NOT CHANGE THE FUNCTION HEADER (the first line of code) % % a) Reading a Comma-separated numbers file. Read in a csvfile whose % filename is given as an input to this function in csv1. Store the % resultant array in csvArr. % % Write your code here: csvArr = csvread(csv1); c % b) Writing a Comma-separated numbers file. Create a copy of csvArr and % then remove all the even rows. Write the resultant array to the filename % that is given as an input to this function in csv2 as a csv file. % % Write your code here: csvArr = csvArr(:,1:2:end);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: csvwrite(csv2,csvArr); c % c) Reading a General delimited text file. Read in a dlmfile that is % delimited by tabs, whose filename is given as an input to this function % in dlm1. Store the resultant array in dlmArr. % % Write your code here: dlmArr = dlmread(dlm1,' '); d % d) Writing a General delimited text file. Create a copy of dlmArr and % then remove all the even columns. Write the resultant array to the % filename that is given as an input to this function in dlm2. Your % output file should be delimited by exclamation points (!). % % Write your code here: dlmArr = dlmArr(:,1:2:end); dlmwrite(dlm2) = dlmArr; d...
View Full Document

This note was uploaded on 10/21/2010 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Institute of Technology.

Ask a homework question - tutors are online