How to manually add matrices using only for loops

1 view (last 30 days)
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 Comments
Adam
Adam on 11 Dec 2019
Your matrices need to have one condition - that they are the same size, otherwise how are you defining addition?
Qasim Mahmood
Qasim Mahmood on 11 Dec 2019
That condition was automatically assumed by me since it's the fundamental of matrix addition.

Sign in to comment.

Answers (1)

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

Sign in to comment.

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!