Filter löschen
Filter löschen

Accessing Table entries in MATLAB

30 Ansichten (letzte 30 Tage)
Waqas Siddique
Waqas Siddique am 3 Okt. 2020
Bearbeitet: Ameer Hamza am 3 Okt. 2020
How do I access a value in a MATLAB table and add it to another value in the same table?The MATLAB table is imported from a csv file.

Antworten (2)

Ameer Hamza
Ameer Hamza am 3 Okt. 2020
Bearbeitet: Ameer Hamza am 3 Okt. 2020
There are several ways to access data in MATLAB table: https://www.mathworks.com/help/matlab/matlab_prog/access-data-in-a-table.html. Two most commonly used are
1) Using variable name,
T.Var2(2) % access 2nd element in column Var2
T.Var2(5) = T.Var3(4); % assign 4th entry in column 3 to 5th entry in column 2.
2) Using brace indexing.
T{2,2} % access 2nd element in 2nd column
T{5,2) = T.{4,3}; % assign 4th entry in column 3 to 5th entry in column 2.

madhan ravi
madhan ravi am 3 Okt. 2020

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by