From: "Sadik " <>
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$>
References: <gvdq74$6mf$>
Reply-To: "Sadik " <>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1243265942 26343 (25 May 2009 15:39:02 GMT)
NNTP-Posting-Date: Mon, 25 May 2009 15:39:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1666517
Xref: comp.soft-sys.matlab:542403

Hi Kola,


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:


"Kola Ogidi" <> wrote in message <gvdq74$6mf$>...
> 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