필터 지우기
필터 지우기

element multiplication- question on multiplying row elements

조회 수: 9 (최근 30일)
Mike
Mike 2013년 11월 4일
댓글: Mike 2013년 11월 4일
if I have a m*n matrix, it is possible to transform it into a m*n-1 matrix where each m row consists of [n0*n1, n1*n2, n2* n3, ...n-1*n] ?

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 11월 4일
x(:,1:end-1).*x(:,2:end)
  댓글 수: 1
Mike
Mike 2013년 11월 4일
Thanks guys- I ended up creating 2 matrices and multiplying the elements together. But this is a lot more efficient. Thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by