Clear Filters
Clear Filters

displaying/returning two columns in matlab

8 views (last 30 days)
Mohamed Jamal
Mohamed Jamal on 30 Aug 2020
Answered: madhan ravi on 30 Aug 2020
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.

Answers (1)

madhan ravi
madhan ravi on 30 Aug 2020
T = array2table([output_number(:), (1:numel(output_number)).'], 'VariableNames', {'Output Number', 'Sequence Number'})

Categories

Find more on Multidimensional Arrays in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!