MATLAB Answers

Let x=[2 4 6 8 10] and y=[1 3 5 7 9]. Compute for the vector z whose elements are equal to z= (xy+ y/x)/[(x+y)]^((y-x)) + 10^(x⁄y)

조회 수: 4(최근 30일)
John Doe
John Doe 2021년 9월 21일
댓글: Alan Stevens 2021년 9월 21일
This is my answer:
x = [2 4 6 8 10];
y = [1 3 5 7 9];
z = (((x.*y)+(y./x))/((x+y).^(y-x)))+10.^(x./y)
z = 195.4683 117.0126 111.3172 109.3632 108.3838
Can somebody confirm if this is correct? Or is there something that I need to change?

채택된 답변

Alan Stevens
Alan Stevens 2021년 9월 21일
You need
z = (((x.*y)+(y./x))./((x+y).^(y-x)))+10.^(x./y)
% another dot here ^
  댓글 수: 2

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

추가 답변(0개)

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by