MATLAB Answers

array addition without operator or built in function

3 ビュー (過去 30 日間)
Maaz Nayeem
Maaz Nayeem 2019 年 9 月 25 日
コメント済み: James Tursa 2019 年 9 月 25 日
hey, how to add two arrays of same size without using the addition operator or any built in function in matlab

  8 件のコメント

表示 5 件の古いコメント
Guillaume 2019 年 9 月 25 日
The easy way to find out if something is built-in is to ask which:
>> which plus(1, 1)
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\ops\@double\plus) % double method
>> which minus(1, 1)
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\ops\@double\minus) % double method
If all built-in are banned, you could always go the 'easy' way: mex!
KALYAN ACHARJYA 2019 年 9 月 25 日
Hello Maze,
Looking for answer from your teacher, I am following the question. Please post the answer, when it will be solved.
James Tursa
James Tursa 2019 年 9 月 25 日
@Maaz: It seems the intent of the assignment is to simply add two arrays in a loop element-by-element, as an exercise in writing loops and accessing variable elements via indexing. Do you know how to do this? Have you tried anything yet? What problems are you having?


回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by