Info
此问题已关闭。 请重新打开它进行编辑或回答。
How to get the required output?
1 次查看(过去 30 天)
显示 更早的评论
x=[4 5 1 2 3] & y=[6 7 8 9 10] and required output is c = [21 10]
3 个评论
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.
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!