MATLAB Answers

How to shift contents of a row in a table in matlab

4 views (last 30 days)
Temitope Olayinka
Temitope Olayinka on 27 Jan 2020
Hi all,
I read a csv file into a table in matlab. I would like to shift the contents of some specific rows in the table to the right or to the left. That is, if i have a table of 10 rows and 3 columns and i want to shift the contents of the second row, second column to the right, resulting in a 4 column table and an empty cell in the second row of the second column.
e.g
1 2 3
4 5 6
7 8 9
2 6 8
.
.
.
e.t.c
shifted to:
1 2 3 0
4 0 5 6
7 8 9 0
2 6 8 0
.
.
.
e.t.c
Thank you for your help.

  0 Comments

Sign in to comment.

Answers (0)

Sign in to answer this question.


Translated by