Adding a row to an existing table

9 ビュー (過去 30 日間)
Abdullah AYYILDIZ
Abdullah AYYILDIZ 2021 年 9 月 28 日
コメント済み: Image Analyst 2021 年 9 月 28 日
Hi there,
I had asked a question earlier and someone had given me the link to a documentation which was very helpful but it doesnt help with the current issue. I have a list with 21 students' names, student numbers, their 4 lab marks 1 midterm mark and 4 exam question marks. We are asked to add a row that has my name student number and rest of the marks. How do we do this? I searched found only matrix answers. Which syntax should we use for this?

採用された回答

Image Analyst
Image Analyst 2021 年 9 月 28 日
What form is the "list" in? A table (hopefully)?
rows = height(t);
t(rows+1).name = "Abdullah";
t(rows+1).studentNumber = 1234;
A cell array?
rows = height(ca);
ca{rows+1, 1} = "Abdullah";
ca{rows+1, 2} = 1234;
  2 件のコメント
Abdullah AYYILDIZ
Abdullah AYYILDIZ 2021 年 9 月 28 日
Okay the first one helped !! Thanks a lot Image Analyst!
Image Analyst
Image Analyst 2021 年 9 月 28 日
You're welcome. Can you then mark the Answer as "Accepted"? Thanks in advance.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDownloads についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by