The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: How to Select Entire Row From Excel File Uisng Prompt?
Replies: 11   Last Post: Nov 23, 2012 5:52 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Phil Goddard

Posts: 358
Registered: 1/27/12
Re: How to Select Entire Row From Excel File Uisng Prompt?
Posted: Nov 19, 2012 5:41 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

You need to do error checking, and I am assuming your file is as per one of your previous posts whether the first column is read in as integer numbers (which can be interpreted as dates):

requireDateNumber = %whatever your user enters

data = xlsread('myfile.xls');
rowIndex = (data(:,1) == requiredDateNumber);

if any(rowIndex)
rowData = data(rowIndex,2:end);
error('There is no corresponding row.');


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.