>> A=[1 2;3 4]; >> B=[9 8 7;6 5 4;3 2 1]; >> a=[11,12] >> b=[21;22]; >> c=[19 18 17]; >> d=[29;28;27];
i am stuck on these questions , i did the rest but really stuck on these question , i spend almost 4 hours playing around with different ways, but can't get the right answer. any help will be much appreciated. Thank you soo much

답변 (2개)

Mischa Kim
Mischa Kim 2014년 2월 23일
편집: Mischa Kim 2014년 2월 23일

0 개 추천

John, for the first one, use
ans1 = [a b'; d B]
it's simply putting together vectors and matrices in the correct order. To get the 1's in the second example, you could use A(1,1), four times. And so on and so forth...

댓글 수: 6

john hollywood
john hollywood 2014년 2월 23일
thank you soo much it works , what about part F and G '
Mischa Kim
Mischa Kim 2014년 2월 23일
F works just the same: put together vectors in the correct order. With the prime (') you can turn a column into a row vector, and vice versa.
G: I already showed you how to get 1's. The zero matrix (2-by-2) you get by using A-A .
john hollywood
john hollywood 2014년 2월 24일
편집: john hollywood 2014년 2월 24일
for 'part F' i just don't how put number "29" in there. also for 'Part G', i just don't know how to put matrix A in that diagonal form.i did try switch rows and columns and also tried transpos but nothing seems to work. i used diag(diag(A')) But its not working. Thank you soo much
Mischa Kim
Mischa Kim 2014년 2월 24일
편집: Mischa Kim 2014년 2월 24일
Here you go:
F = [[A(1,1) A(1,1); A(1,1) A(1,1)] a' b; c d(1)]
G = [A(1,1) A(1,1)-A(1,1) A(1,1) A(1,1)-A(1,1);
A(1,1)-A(1,1) 2*A(1,1) A(1,1)-A(1,1) A(1,1);
[A(1,1) A(1,1); A(1,1) A(1,1)] A-A]
Please post follow-up question and comments as comment, not answers.
Walter Roberson
Walter Roberson 2014년 2월 24일
The "2*" of "2*A(1,1)" violates the constraint of not introducing any new scalars. You could replace the "2*A(1,1)" with A(1,1)+A(1,1)
However, as I read the question, the indices (1,1) would be introduced scalars. Forming the 2 x 2 sub-block of 1's then becomes difficult.
Sagar Damle
Sagar Damle 2014년 2월 25일
I think we are allowed to use scalars as indices but not as extra data.
John,where did you get these questions(from which book)?If they are in a book,are they in 'Exercise' of a chapter?What are the contents of that chapter?(This will help us to narrow our thinking,because exercise of a chapter contains problems related to that chapter.)
Can we use rem(input_matrix,2) to get output in terms of 0's and 1's only?

댓글을 달려면 로그인하십시오.

john hollywood
john hollywood 2014년 2월 24일

0 개 추천

for 'part F' i just don't how put number "29" in there. also for 'Part G', i just don't know how to put matrix A in that diagonal form.i did try switch rows and columns and also tried transpos but nothing seems to work. i used diag(diag(A')) But its not working. Thank you soo much

카테고리

도움말 센터File Exchange에서 Linear Algebra에 대해 자세히 알아보기

제품

질문:

2014년 2월 23일

댓글:

2014년 2월 25일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by