- #1

Adam Holland

- 7

- 0

ex:

syms i j k

A=[2*i 3*j 1*k]

B=[1*i 2*j 3*k]

However I quickly found out that when taking cross products this can quickly get confusing when the program returns combinations of the operators which i would have to make sure and keep careful track of when getting my final answer and double checking.

ex:

cross(A,B)

ans=

[ 7*j*k, -5*i*k, i*j]

So is there a way to keep them separate as to and retain "i,j,k" and/or possibly have an if statement of something of the sort so that when you get say i*j Matlab will catch it and automatically replace it with k?

Thanks for the help. Sorry if I have trouble with any replies, like i said I don't know Matlab, just Fortran so please bear with me as I try to halfway teach myself this language.