I have an array and I want to know how many indexing values are needed for the value of the array to increase
조회 수: 1 (최근 30일)
이전 댓글 표시
I have an array and I want to know how many indexing values are needed for the value of the array to increase for example a unit or more. For example, a=[100 100 100 101 101 101 101 103 103 103] and the indexing values would be 4 and 8.
댓글 수: 0
답변 (1개)
Tushar Behera
2023년 2월 1일
Hi Correia,
It is not clear from your question as of what you want to acheive, I am assuming you want to increase the size of your array.
you can increase the size of an array by concatenating new elements to the existing array using the 'cat' function. For example:
% Define original array
A = [1 2 3];
% Concatenate new elements to the end of the array
A = [A 4 5 6];
I hope this answers your question.
Regards,
Tushar
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!