displaying/returning two columns in matlab
7 次查看(过去 30 天)
显示 更早的评论
Hi guys,
I have a function that returns output array of integers size 10 like [1 1 1 1 1 1 1 1 1 1 ] , what I want to do is that output to write aside every value of the array the sequence alphabet numbers order I mean to write aside every value of the output :
this is the output: (array of integers)
1
1
1
1
1
1
1
1
1
1
I need to write aside every value the sequence of alphabet numbers order (1 2 3 4 5 6 7 8 9 ..) so the output would be like this:
output sequence number
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
if output is bigger than 10 -in my case it's 10- then we complete 11 ..12 ..13..etc)
could anyone help me how I can do that in matlab? thanks alot for any help.
0 个评论
回答(1 个)
madhan ravi
2020-8-30
T = array2table([output_number(:), (1:numel(output_number)).'], 'VariableNames', {'Output Number', 'Sequence Number'})
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!