gsubtract
Sottrazione generalizzata
Sintassi
gsubtract(a,b)
Descrizione
gsubtract(a,b)
considera due matrici o array di celle e le sottrae elemento per elemento.
Esempi
Sottrazione di valori di matrici e di array di celle
Questo esempio mostra come sottrarre valori di matrici e di array di celle.
gsubtract([1 2 3; 4 5 6],[10;20])
ans = 2×3
-9 -8 -7
-16 -15 -14
gsubtract({1 2; 3 4},{1 3; 5 2})
ans=2×2 cell array
{[ 0]} {[-1]}
{[-2]} {[ 2]}
gsubtract({1 2 3 4},{10;20;30})
ans=3×4 cell array
{[ -9]} {[ -8]} {[ -7]} {[ -6]}
{[-19]} {[-18]} {[-17]} {[-16]}
{[-29]} {[-28]} {[-27]} {[-26]}
Cronologia versioni
Introdotto in R2010b