vector subtraction

6 次查看(过去 30 天)
osman
osman 2011-10-11
z=[1,2,3,5,6,7,8,9,0,12,12,3,4,1,2,4,5]; y=[1,2,3,4];
i want to subtract row of z from the every element of y. can i do it without loops.
  1 个评论
Sean de Wolski
Sean de Wolski 2011-10-11
What is different about this and your duplicate post here:
http://www.mathworks.com/matlabcentral/answers/18021-matrix-vector-substraction

请先登录,再进行评论。

回答(1 个)

Fangjun Jiang
Fangjun Jiang 2011-10-11
bsxfun()

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by