matrix iteration and subtraction

조회 수: 2 (최근 30일)
Anusha
Anusha 2013년 10월 31일
답변: Andrei Bobrov 2013년 10월 31일
y=
6
7
2
4
S=
8
1
3
0
d=|y-s| for each iteration y take one value and subtract with each value of s eg: first iteration d=
2
5
3
6
how to find d value for four iterations

채택된 답변

Andrei Bobrov
Andrei Bobrov 2013년 10월 31일
d = abs(bsxfun(@minus,y(:),s(:)'));

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by