How to manually add matrices using only for loops

1 回表示 (過去 30 日間)
Qasim Mahmood
Qasim Mahmood 2019 年 12 月 7 日
コメント済み: Qasim Mahmood 2019 年 12 月 11 日
I have 2 matrices which have no conditions C and D. How do I express using only for loops that they should undergo addition to create another matrix.
  4 件のコメント
Adam
Adam 2019 年 12 月 11 日
Your matrices need to have one condition - that they are the same size, otherwise how are you defining addition?
Qasim Mahmood
Qasim Mahmood 2019 年 12 月 11 日
That condition was automatically assumed by me since it's the fundamental of matrix addition.

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

回答 (1 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 12 月 10 日
Here Loop is not required
result=C+D
  2 件のコメント
Qasim Mahmood
Qasim Mahmood 2019 年 12 月 10 日
The question i'm trying to answer says I can't use the in-built functions.
Mahesh Taparia
Mahesh Taparia 2019 年 12 月 11 日
Hi,
Using '+' in code will not be considered that you have used inbuilt function.

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

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by