Can I solve this Matrix multiple of question?
1 次查看(过去 30 天)
显示 更早的评论
Write a matlab program to multiplication of second row and second colomn of A matrix with an entered x value. The result matrix must be assigned B matrix. A=[2 9 -3;1 6 0;-2 7 3]
8 个评论
John D'Errico
2020-5-6
Yes, but if we do your homework, then do we get credit for it? Will you tell your teacher that you asked someone to do your homework for you?
采纳的回答
KSSV
2020-5-6
A = rand(4) ; % matrix must be square
x = rand ; % some value of x
iwant = A(2,:)*x*A(:,2)
5 个评论
更多回答(1 个)
Paresh yeole
2020-5-6
If you want to mulitply, the value at A(2,2) with x :
B = A(2,2)*x;
Or else if you want to multiply entire second column and entire second row with x and store the result in B then :
A(:,2) = A(:,2)*x;
A(2,:) = A(2,:)*x;
B = A;
If you want A(2,2) to be multipled by x for just once then divide it after the above two operations
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!