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

New to MATLAB?

How to call structure value in simulink?

Asked by Arun Badigannavar on 25 Feb 2013
Accepted Answer by TAB

TAB (view profile)

> Test_Structure

Test_Structure =

    a: [10 20 30]
    b: [50 60 70]

>> how to call above structure into simulink?

0 Comments

Tags

Products

1 Answer

Answer by TAB

TAB (view profile)

on 25 Feb 2013
Accepted answer

Simply put Test_Structure.a or Test_Structure.b in constant block to use their values.

3 Comments

Arun Badigannavar on 25 Feb 2013

Thanks for the answer,,but rather i am looking for something else,,,like I want a *_Test_Sructure.a(1,1),_Test_Sructure.a(1,2)*values to be assigned to only one constant vlock in a for loop,,,

TAB

TAB (view profile)

on 25 Feb 2013

If you want to access the elements of array, put Test_Structure.a in constant block and pass this to data port of Index vector block.

TAB

TAB (view profile)

Contact us