How can i add two matrices with using nested for loops.

How can i write a program which adds two matrices without using x+y Thank you

2 件のコメント

Adam
Adam 2016 年 11 月 24 日
If you really don't know how to do this you need to start from reading the basic introductory Matlab help. It is just about the simplest possible thing you can do and you have already asked a question how to multiply two matrices in a loop. If you understood that are you really not able to work out how to add two matrices which is far simpler?
KSSV
KSSV 2016 年 11 月 24 日
編集済み: KSSV 2016 年 11 月 24 日
Home work...when you got help for multiplication http://in.mathworks.com/matlabcentral/answers/313631-how-to-multiply-two-matrices-with-nested-for-loops, you should do addition on your own. No one will do your home work.

サインインしてコメントする。

回答 (1 件)

Jan
Jan 2016 年 11 月 24 日

0 投票

If you avoid tricks like x - (-y) this is impossible. You cannot add values without using the "+" operator.

1 件のコメント

Adam
Adam 2016 年 11 月 24 日
Well, you can do
plus( x, y )
to cheat as well!

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

質問済み:

2016 年 11 月 24 日

コメント済み:

2016 年 11 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by