Matlab - Stack Data Structure

后端 未结 5 1895
悲哀的现实
悲哀的现实 2021-02-07 22:39

Can I have a stack data structure in matlab?

For example a stack of integers where I can push elements in it like stack.push(i), get elements out of it like

5条回答
  •  别那么骄傲
    2021-02-07 23:38

    Please use MATLAB arrays as is. They are 100 times faster than using any java util. Write the extra logic to make the array work like a stack.

    From personal experience just try to re-write your algorithm to use MATLAB array.

提交回复
热议问题