Instruction 'B = 1:m' will create a vector consisting of [1,2,3,...,k] where k is [m].
I think you want to append m at the end of B. To do so use the following instruction:
B(end + 1) = m;
Instruction 'B = 1:m' will create a vector consisting of [1,2,3,...,k] where k is [m].
I think you want to append m at the end of B. To do so use the following instruction:
B(end + 1) = m;
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!