Prev: How to read STRUCT to MOV
Next: optimisation fminsearch
From: Heli Golwala on 18 May 2010 07:26 i want to generate triangle of amplitude 1. and its period shud be variable.
From: Wayne King on 18 May 2010 07:40 "Heli Golwala" <heligolwala(a)yahoo.co.in> wrote in message <hsttgc$aec$1(a)fred.mathworks.com>... > i want to generate triangle of amplitude 1. and its period shud be variable. Hi, if you have the Signal Processing Toolbox, see >>doc triang Wayne
From: John on 18 May 2010 10:33 On 18 май, 15:26, "Heli Golwala" <heligolw...(a)yahoo.co.in> wrote: > i want to generate triangle of amplitude 1. and its period shud be variable. Simply you can do like this: plot(repmat([0.1:0.1:1 0.9:-0.1:0],1,10)) In this case I make one period of triangle and repeate it 10 times. Best Regards, Ivan
From: Walter Roberson on 18 May 2010 10:43 John wrote: > On 18 май, 15:26, "Heli Golwala" <heligolw...(a)yahoo.co.in> wrote: >> i want to generate triangle of amplitude 1. and its period shud be variable. > > Simply you can do like this: plot(repmat([0.1:0.1:1 0.9:-0.1:0],1,10)) > In this case I make one period of triangle and repeate it 10 times. That should be 0.9:-0.1:0.1 With the current code, you would get two 0's in a row.
From: dbd on 18 May 2010 11:45
On May 18, 7:43 am, Walter Roberson <rober...(a)hushmail.com> wrote: > John wrote: > > On 18 май, 15:26, "Heli Golwala" <heligolw...(a)yahoo.co.in> wrote: > >> i want to generate triangle of amplitude 1. and its period shud be variable. > > > Simply you can do like this: plot(repmat([0.1:0.1:1 0.9:-0.1:0],1,10)) > > In this case I make one period of triangle and repeate it 10 times. > > That should be 0.9:-0.1:0.1 > With the current code, you would get two 0's in a row. Actually, 0.9:-0.1:0.1 gives no 0's in a row. This was one of those cases that was too simple to test right? Dale B. Dalrymple |