day21notes2oclock.m - wednesday notes more cell arrays...

This preview shows page 1 out of 1 page.

% wednesday notes % more cell arrays % given this cell array - loop through it and print out which class each % one isS clc;clear fid = fopen('report.txt','w'); ca = {'tom',89,'joe',92,'mary',99,'melinda',100}; lng = length(ca); % be careful not to use length or class as variables total = 0; for i = 1:lng cl = class(ca{i}); fprintf(fid,'The item at position %d is a %s.\n',i,cl); if isnumeric(ca{i}) total = total + ca{i}; end end fprintf(fid,'The total of number is %d.',total); fclose(fid); % xlsread will read .xls files and seperate the data into nums and char % data [nums,txt,raw] = xlsread('gradeSheet.xls'); % numeric data is stored in nums as an array of double % character data is stored in txt as a cel array % all the data is stored in raw as a cell array
Image of page 1
  • Fall '08
  • Staff
  • IEEE 754-2008, NaN

{[ snackBarMessage ]}

Get FREE access by uploading your study materials

Upload your study materials now and get free access to over 25 million documents.

Upload now for FREE access Or pay now for instant access
Christopher Reinemann
"Before using Course Hero my grade was at 78%. By the end of the semester my grade was at 90%. I could not have done it without all the class material I found."
— Christopher R., University of Rhode Island '15, Course Hero Intern

Ask a question for free

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern