Thread Subject: Simple simulink problem

Subject: Simple simulink problem

From: Ashwini Deshpande

Date: 21 Oct, 2009 06:19:02

Message: 1 of 5

Hi,

In simulink i have defined a array as follows using constant block:
a=[1 0 1 1 1 0 0 0 1];

Now i want to read the elements of array 'a' one by one, i mean at every sample time one element in ascending or descending order.

How do i do this ??

In otherwords if scope block is connected to the arrary, i suppose to see a binary signal of zeros and ones there.

Thanks !
Ashwini

Subject: Simple simulink problem

From: Arnaud Miege

Date: 21 Oct, 2009 11:39:29

Message: 2 of 5


"Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in message
news:hbm94m$9bn$1@fred.mathworks.com...
> Hi,
>
> In simulink i have defined a array as follows using constant block:
> a=[1 0 1 1 1 0 0 0 1];
>
> Now i want to read the elements of array 'a' one by one, i mean at every
> sample time one element in ascending or descending order.
>
> How do i do this ??
>
> In otherwords if scope block is connected to the arrary, i suppose to see
> a binary signal of zeros and ones there.
>
> Thanks !
> Ashwini
>

Don't use the constant block, use the repeating sequence block:
http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/slref/repeatingsequence.html

HTH,

Arnaud

Subject: Simple simulink problem

From: Ashwini Deshpande

Date: 21 Oct, 2009 13:02:20

Message: 3 of 5

 
> Don't use the constant block, use the repeating sequence block:
> http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/slref/repeatingsequence.html
>
> HTH,
>
> Arnaud
>
Thanks ,
My requirement something similar to the repeating sequence block, there i want to have the sequence of zeros and ones, but it expects that the sequence should be in ascending order.
what do i do??
Ashwini

Subject: Simple simulink problem

From: Arnaud Miege

Date: 21 Oct, 2009 14:12:47

Message: 4 of 5


"Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in message
news:hbn0os$a6e$1@fred.mathworks.com...
>
>> Don't use the constant block, use the repeating sequence block:
>> http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/slref/repeatingsequence.html
>>
>> HTH,
>>
>> Arnaud
>>
> Thanks ,
> My requirement something similar to the repeating sequence block, there i
> want to have the sequence of zeros and ones, but it expects that the
> sequence should be in ascending order.
> what do i do??
> Ashwini
>

You are right, I was a bit too hasty. Use the repeating sequence stair block
instead:
http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/slref/repeatingsequencestair.html

HTH,

Arnaud

Subject: Simple simulink problem

From: Ashwini Deshpande

Date: 22 Oct, 2009 04:22:03

Message: 5 of 5

>
> You are right, I was a bit too hasty. Use the repeating sequence stair block
> instead:
> http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/slref/repeatingsequencestair.html
>
> HTH,
>
> Arnaud
>
Thank you very much...
Got the solution .... :-))

Ashwini

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
simulink Ashwini 21 Oct, 2009 02:24:06
array Ashwini 21 Oct, 2009 02:24:06
rssFeed for this Thread

Contact us at files@mathworks.com