A function that inserts an element into an array
古いコメントを表示
So I am doing my homework on MatLab and I am baffled by this question given. It is to write a script that enters an element into an array at an index.
The array(A)'s size is 1 by N. The element(e) is the value that is entered. index(i) is the ith position of the array.
No specific array is provided.
All I know is that after the element has bee added the size of the array is now 1 by (N+1)
But beyond this, I don't even know where to start.
Please help! (explanation would be appreciated too!)
*note : this is an introductory class. So far, I have only covered functions, arrays
3 件のコメント
Stephen23
2020 年 9 月 14 日
Most likely you will need to use indexing. Show us what you have tried so far.
Seong Ho Yang
2020 年 9 月 14 日
Stephen23
2020 年 9 月 14 日
"...I have no idea how to index":
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
