displaying/returning two columns in matlab

13 visualizaciones (últimos 30 días)
Mohamed Jamal
Mohamed Jamal el 30 de Ag. de 2020
Respondida: madhan ravi el 30 de Ag. de 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.

Respuestas (1)

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

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by