Search All of the Math Forum:

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

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

Topic: date search and giving respective value
Replies: 10   Last Post: Apr 19, 2013 1:16 PM

 Messages: [ Previous | Next ]
 dpb Posts: 9,850 Registered: 6/7/07
Re: date search and giving respective value
Posted: Apr 4, 2013 10:39 AM

On 4/4/2013 8:47 AM, sensation wrote:
> Hi there, i have date (hourly data) in my file in matlab serial data
> number and i am searching for a date I want as:
>
> idents1 = find(data1(:,1)>=datenum([2004 01 01 00 00 00]) & ...
> data1(:,1)<=datenum([2008 12 31 23 00 00]));
> tspen = length(idents1)
>
>
> for i=1 to tspen
>
> NOW I AM FACING THE PROBLEM
>
> HOW TO WRITE
> IF EP HIGHER or equal THAN FIRST OF JANUARY AND LESS THAN 1 OF APRIL (OF
> EACH YEAR) EP HAS A VALUE OF 0.62

What's EP? It doesn't seem to make any sense to set some variable w/
the value of a date (between Jan 1 and March 30) to a fraction like 0.6

...

All the rest seem as though would be solvable by an extension of what
need for the above so let's try to figure out what it is you're really

How about a (very short) sample dataset? Shouldn't take but a
half-dozen to ten records to illustrate...

--

Date Subject Author
4/4/13 Guest
4/4/13 dpb
4/5/13 Guest
4/5/13 dpb
4/5/13 dpb
4/5/13 dpb
4/18/13 sensation
4/18/13 dpb
4/19/13 sensation
4/19/13 dpb
4/19/13 dpb