Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Converting Matrix Dimensions?
Date: Mon, 19 Jan 2009 01:35:03 +0000 (UTC)
Organization: Battelle Energy Alliance (INL)
Lines: 25
Message-ID: <gl0lc7$3ta$1@fred.mathworks.com>
References: <gktk1p$7ak$1@fred.mathworks.com> <gkvjgd$e4c$1@fred.mathworks.com> <gl0hap$83m$1@fred.mathworks.com> <gl0ii5$ru9$1@fred.mathworks.com> <gl0kjp$crb$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1232328903 4010 172.30.248.37 (19 Jan 2009 01:35:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 19 Jan 2009 01:35:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 688530
Xref: news.mathworks.com comp.soft-sys.matlab:512366


I assume you are using Matfiles which store Matlab variables.  If so then this should work.

filename=input('What data file would you like to load? ','s');
load(filename);

clear filename
who
numbers = input('Which variable do you want to manupulate?')


numbers(:).'  % The file name.
allnumbers=numbers(:).'
length(allnumbers)
l=length(allnumbers)
disp(['Length of data ' num2str(l)])
sum(allnumbers)
s=sum(allnumbers)
mean=s/l
disp(['Your mean is ' num2str(mean)])





7I]K?#?]]MWFAS?]?dJ@M+CkFG]]CNT?@JSFMR}d?EMMGKNLRAR?C]MCLw]