I start learning to use Matlab. And I don't know how to create vectors:
1) $1,1/2,1/3,1/4....$
2) $0, 1,2, 2/3, 3/4...$
I start learning to use Matlab. And I don't know how to create vectors:
1) $1,1/2,1/3,1/4....$
2) $0, 1,2, 2/3, 3/4...$
Copyright © 2021 JogjaFile Inc.
You cannot create infinitely long vectors in MATLAB (or any other programming language that I am aware of). Note that the computer needs to be able to represent all the elements in that vector in its memory, and that memory is finite.
You could represent a truncated version of the vector as follows: