how do I add magic matrices?

How should I fix the error to make it function?
magic(2) + magic (3)

 Accepted Answer

imresize(magic(2), [3 3]) + magic(3)
ans = 3×3
8.6335 2.9306 9.2276 5.5000 7.5000 9.5000 8.3665 12.0694 3.7724
padarray(magic(2), [1 1], 'post') + magic(3)
ans = 3×3
9 4 6 7 7 7 4 9 2
magic(2) + imcrop(magic(3), [1 1 1 1])
ans = 2×2
9 4 7 7

More Answers (0)

Categories

Find more on Operators and Elementary Operations 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!