필터 지우기
필터 지우기

Summation of an array

조회 수: 3 (최근 30일)
Barry Allen
Barry Allen 2020년 2월 5일
댓글: Barry Allen 2020년 2월 6일
How can i code this in matlab?

채택된 답변

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH 2020년 2월 5일
if length(P) and length(Y) is N:
x=sum(P.*Y)
in another case:
N=5; %set any value for N
x=sum(P(1:N).*Y(1:N))
  댓글 수: 1
Barry Allen
Barry Allen 2020년 2월 6일
What if N is different?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Number Theory에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by