Path: news.mathworks.com!not-for-mail
From: "Ender " <jr147@msstate.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Undefined function or method
Date: Thu, 9 Jun 2011 19:49:04 +0000 (UTC)
Organization: Mississippi State University
Lines: 26
Message-ID: <isr83g$60u$1@newscl01ah.mathworks.com>
Reply-To: "Ender " <jr147@msstate.edu>
NNTP-Posting-Host: www-06-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1307648944 6174 172.30.248.38 (9 Jun 2011 19:49:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 9 Jun 2011 19:49:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1035766
Xref: news.mathworks.com comp.soft-sys.matlab:731144

I am trying to take data that has a time, and date associated with each data point. I would like to put this data into an array which has "[Pressure, Time, Date]

I have a bunch of data points > 10. However I am starting out with just 2 so that I can get some of the bugs out. However this particular bug does not make much sense to me. I get this error,"Undefined function or method 'Press' for input arguments of type 'double'.
" I am not sure why I am getting this error. My logic seems correct, and I don't think I misspelled anything. However, this error is here. Here is an example of my code:

% Pressure at date and time
    
    % Sample 1
        [y, m, d, h, mn,] = datevec('June 07, 2011  11:53:00 AM');
        date1 = sprintf('Date: %d/%d/%d   Time: %d:%d%f\n', m, d, y, h, mn) % Month, Day, Year, Hour, Minute
        Press1 = 6.00e-5;  % Torr
    
    % Sample 2
        [y, m, d, h, mn,] = datevec('June 07, 2011  1:45:00 PM');
        date2 = sprintf('Date: %d/%d/%d   Time: %d:%d%f\n', m, d, y, h, mn) % Month, Day, Year, Hour, Minute
        Press2 = 2.06e-5;  % Torr
 
        
% Store date into an array
    for i = 1:2
%         date_6_7_11(i) = [date(i)];
        Press_6_7_11 = [Press(i)];
        i = i+1
    end

--Ender--