How to union columns in the same Variable (Array) ?

2 次查看(过去 30 天)
.
.
How do i union column 1,2,3.... 9 together in this case? All in the same variable.

采纳的回答

Jan
Jan 2014-11-1
x = unique(wavelengtha_5(:));

更多回答(2 个)

Azzi Abdelmalek
Azzi Abdelmalek 2014-10-31
They are already in the same variable, but if you mean how to reshape for example the variable x
out=x(:)
  3 个评论
hithere
hithere 2014-11-1
编辑:hithere 2014-11-1
for example the variables is like this:
1 2 6
3 4 10
5 8 12
7 11 13
9 14 15
if they were in different variable, a union function will be
1
2
3
4
5
6
7
8
.
.
.
15
in ascending order and eliminating duplicates.
So im think how to have the same effect in this scenario.

请先登录,再进行评论。


Peter Perkins
Peter Perkins 2014-11-1
I think you are looking for UNIQUE.

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by