- #1

- 590

- 0

detA=PxS

A=

[tex]\hat{i}[/tex] [tex]\hat{j}[/tex] [tex]\hat{k}[/tex]

P

_{1}P

_{2}P

_{3}

S

_{1}S

_{2}S

_{3}

how do i build a code so that my det will give me a vector answer?

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter Dell
- Start date

- #1

- 590

- 0

detA=PxS

A=

[tex]\hat{i}[/tex] [tex]\hat{j}[/tex] [tex]\hat{k}[/tex]

P

S

how do i build a code so that my det will give me a vector answer?

- #2

- 175

- 1

Doing what you're asking (in MATLAB) is a somewhat complicated problem. It's easy to do this by hand, but MATLAB is a bit different. Think about how you would do this by hand - what are [tex]\hat{i}[/tex], [tex]\hat{j}[/tex], and [tex]\hat{k}[/tex]?

Since each of these is a vector (three components in 3-space), MATLAB won't let you create a matrix containing these vectors - you'll get a dimension mismatch error. What you might be able to do is define symbols (do you have the symbolic math toolbox?) for i, j, and k, and use these in your matrix. This will give you an answer, but it won't be very useful, because you won't be able to operate on your result.

-Kerry

- #3

- 590

- 0

another problem i need to do is make a table containing

names and ages

name1 48

name2 33

name4 90

...

namen 22

totally randomly, at least 15 names, and then perform a number of tasks on them, is there a way i can tell matlab to make the random table or do i need to plug in all the names and ages, can i make a nx2 matrix where the 1st colomn is made up of words not numbers? also can i tell matlab to make name(n) where n runs from 1->15

- #4

- 175

- 1

-Kerry

- #5

- 590

- 0

thanks a lot, btw i managed the det using

syms i j k

syms i j k

- #6

- 590

- 0

name1 48

name2 33

name4 90

...

namen 22

could you please help, or if possible write the code i need, i didnt really understand the ssprintf function.

even if i try making the matrix it doesnt work, ie

a=['name1' 48; 'name2'.......] i am only managing to make matrices of numbers

- #7

- 175

- 1

-Kerry

- #8

- 590

- 0

- #9

- 175

- 1

-Kerry

Share: