subtract two matrices of sizes [1*5] and [3*5]

2 Ansichten (letzte 30 Tage)
NN
NN am 17 Dez. 2020
Beantwortet: Daniel Pollard am 17 Dez. 2020
I need to subtract m from y ,
m= [1 2 3 4 5 ]
y=[ 10 11 12 13 14
9 8 7 6 5
15 16 17 18 19 ]
Please help

Antworten (1)

Daniel Pollard
Daniel Pollard am 17 Dez. 2020
Well I typed
m = [1 2 3 4 5];
y = [10 11 12 13 14; 9 8 7 6 5; 15 16 17 18 19];
y-m
into my matlab command window, and it returned
[9 9 9 9 9;
8 6 4 2 0;
14 14 14 14 14].
What's the problem exactly?

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by