필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to get the required output?

조회 수: 1 (최근 30일)
Muniba Shah
Muniba Shah 2018년 11월 5일
마감: MATLAB Answer Bot 2021년 8월 20일
x=[4 5 1 2 3] & y=[6 7 8 9 10] and required output is c = [21 10]
  댓글 수: 3
Image Analyst
Image Analyst 2018년 11월 5일
Here's one way
c = [sum(x)+y(1), y(end)];
It meets all your criteria that you've said so far. Here is another, simpler way
c = [21, 10];
It also meets your criteria and is even simpler because x and y were not even needed. If neither of those is good, then say why not.
Muniba Shah
Muniba Shah 2018년 11월 6일
Thank you!

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by