Tr()

For questions that don't fall into one of the categories above, such as working with the RATS interface, using Wizards, etc.

Tr()

Postby ivory4 » Wed Jul 21, 2010 12:35 pm

Code: Select all
com c = ||1.0,1.0,0.0||
disp tr(c)
disp c


why tr(c) and c look the same on out put? what is the dimension here?
ivory4
 
Posts: 149
Joined: Mon Aug 24, 2009 12:16 pm

Re: Tr()

Postby TomDoan » Wed Jul 21, 2010 2:17 pm

VECTOR's are officially column vectors (so it would be 3x1) for matrix multiplications, but will behave as row vectors in other situations if that appears more convenient. DISPLAY would be a good example. I doubt very many people would like to see a multiple line output for a 20 vector. Thus the ector is shown in a single row because that looks best, and tr(c) is shown in a row because it's a 1xn array. You can always use %rows and %cols to get the actual sizes as they would be used in matrix arithmetic.
TomDoan
 
Posts: 2717
Joined: Wed Nov 01, 2006 5:36 pm


Return to Other RATS Usage Questions

Who is online

Users browsing this forum: No registered users and 1 guest