Path: news.mathworks.com!not-for-mail
From: "Sadik " <sadik.hava@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Delayed Unit Step (Heaviside) Function on Matlab
Date: Mon, 25 May 2009 15:39:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 28
Message-ID: <gvee2m$pn7$1@fred.mathworks.com>
References: <gvdq74$6mf$1@fred.mathworks.com>
Reply-To: "Sadik " <sadik.hava@gmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1243265942 26343 172.30.248.38 (25 May 2009 15:39:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 25 May 2009 15:39:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1666517
Xref: news.mathworks.com comp.soft-sys.matlab:542403

Hi Kola,

heavisidesixtyfour=(t>=64);

can never give such an error because you are not doing any multiplication. The problem might be somewhere else. I believe, transposing t should solve the problem. So you would say:

heavisidesixtyfour=(t'>=64);

"Kola Ogidi" <kko_ogidi@yahoo.co.uk> wrote in message <gvdq74$6mf$1@fred.mathworks.com>...
> Hi,
> 
> I'm trying to create a variable which holds a delayed unit step function which starts at 64 (rather than the normal unit step function which starts at 0).  I named this variable Heavisidesixtyfour and used the following statement to try to implement it:
> 
> heavisidesixtyfour=(t>=64);
> 
> I also set the value at 63 (taking into account a problem I encountered recently which was resolved by including 0 time in my count).  However, I am getting the following error message whichever way I try to run it:
> 
> ??? Error using ==> mtimes
> Inner matrix dimensions must agree.
> 
> I had previously created the normal unit step function as follows:
> 
> heaviside=(t>=0);
> 
> This worked ok but I'm not sure if this might have to do with the problem I'm encountering.  Could you please advise me on what I need to do to achieve my aim.
> 
> Thanks in advance.
> Kola