Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How can i do this in SIMULINK , abs(C(83:883))

Subject: How can i do this in SIMULINK , abs(C(83:883))

From: st

Date: 28 Jan, 2011 08:27:03

Message: 1 of 5

Hi all,

I need help on,

How can i build the block for abs(C(83:883)) with SIMULINK???
How can i specify only taking the value from index 83 to 883 of C before proceed to absolute block?

Many Thanks!!!!
I totally run out of idea....

Subject: How can i do this in SIMULINK , abs(C(83:883))

From: Paulo Silva

Date: 28 Jan, 2011 09:04:04

Message: 2 of 5

"st " <cell_st@hotmail.com> wrote in message <ihtukn$hos$1@fred.mathworks.com>...
> Hi all,
>
> I need help on,
>
> How can i build the block for abs(C(83:883)) with SIMULINK???
> How can i specify only taking the value from index 83 to 883 of C before proceed to absolute block?
>
> Many Thanks!!!!
> I totally run out of idea....

The Signal Processing blockset got a block called submatrix, I hope you got that blockset installed.

Subject: How can i do this in SIMULINK , abs(C(83:883))

From: Shanmugam Kannappan

Date: 28 Jan, 2011 09:21:03

Message: 3 of 5

"st " <cell_st@hotmail.com> wrote in message <ihtukn$hos$1@fred.mathworks.com>...
> Hi all,
>
> I need help on,
>
> How can i build the block for abs(C(83:883)) with SIMULINK???
> How can i specify only taking the value from index 83 to 883 of C before proceed to absolute block?
>
> Many Thanks!!!!
> I totally run out of idea....

Hi!

Y dont you use MATLAB Function Block(User Defined Library) to select the specific index & proceed?
abs(u(83:883)) - Enter in MATLAB function field.
I tried it works!

HTH,
Shan!

Subject: How can i do this in SIMULINK , abs(C(83:883))

From: Shanmugam Kannappan

Date: 28 Jan, 2011 09:44:04

Message: 4 of 5

"Shanmugam Kannappan" <shanmugambe@gmail.com> wrote in message <ihu1pv$g77$1@fred.mathworks.com>...
> "st " <cell_st@hotmail.com> wrote in message <ihtukn$hos$1@fred.mathworks.com>...
> > Hi all,
> >
> > I need help on,
> >
> > How can i build the block for abs(C(83:883)) with SIMULINK???
> > How can i specify only taking the value from index 83 to 883 of C before proceed to absolute block?
> >
> > Many Thanks!!!!
> > I totally run out of idea....
>
> Hi!
>
> Y dont you use MATLAB Function Block(User Defined Library) to select the specific index & proceed?
> abs(u(83:883)) - Enter in MATLAB function field.
> I tried it works!
>
> HTH,
> Shan!

Hi,

You can also use "Selector" block from Signal routing Library in Simulink.

HTH,
Shan!

Subject: How can i do this in SIMULINK , abs(C(83:883))

From: st

Date: 28 Jan, 2011 17:21:04

Message: 5 of 5

Hi Shan,

1) If i m using the Selector box, is it appropriate with my setting below for C(83:883)

Index option: Index Vector(Dialog)
Index: [83:883]

....

i tried to run my simulation... it looks like works fine...
but can confirm with me is it correct to note the index part with ':' to indicate from 83 to 883?

i dun wish to put the thing like [83 84 85 86 87........ until 883]


2) Before using Selector, i tried to use fcn to declare C(83:883) .. but it doesn't work... the put the equation simply like C(83:883) in the fcn dialog box... did i miss out something?

Thank u very much again.

Tags for this Thread

No tags are associated with this thread.

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.

Contact us