For example, I have an array:
a=[1:5 8:10];
If I show it with:
disp(['a = ' num2str(a)]);
The result would be something like
a = 1 2 3 4 5 8 9 10
It is too long than I need. How can I let Matlab appear just like me, or as close as that?
More specifically, if I defined the variable in an “informal” way, for example:
a=[1:3 4:6 8:10]
(usually should be 1: 6 instead of 1: 3 4: 6)
I just want Matlab to display anyway:
1:3 4:6 8:10 or 1:6 8:10
I also don't care if it displays the variable name or square brackets.
Searched, but did not find anything useful. Considered for manual analysis, but this does not seem like a smart way.
Any suggestion would be very helpful, thanks a lot.
source
share