Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: matrix content can be a class type?
Replies: 2   Last Post: Feb 28, 2014 2:04 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
fl

Posts: 90
Registered: 10/8/05
matrix content can be a class type?
Posted: Feb 28, 2014 7:21 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi,
I have an application (a subproject of my project, I would write a function for it) which has two input (10, 6) arrays. Of course, I can write two separate (10, 6) arrays as two input. The first array is the data content while the second array is the data type of the first array, such as:

second_array=[0 0 0 0 0 0;
0 0 0 0 0 0;
0 0 0 0 0 0;
0 0 0 0 0 0;
1 0 0 0 0 0;
1 1 0 0 0 0;
1 1 1 0 0 0;
1 1 1 1 0 0;
1 1 1 1 1 0];

'0' is a type while '1' is another type.

I am wondering that whether I can package the two arrays to one which has a composite type, such as a structure or class. Or do you have other good idea on my question?

Thanks,



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.