How to convert numerical array to string array for table formulation.Below is the 2 attached picture of my command window.

3 ビュー (過去 30 日間)
when I used words like sita in my variable name of table,its working,but when i tried useing a number in variable name its showing an error .My MATLAB version is 2015 so I cant use string command directly.So kindely let me know how I can appear numbers as my variable names and row names in a table.

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 12 月 5 日
I guess in R2015x the table does not allow the column names to begin with a number. You need to add an alphabet at the beginning.
c = array2table(a, 'VariableNames', {['a' num2str(1000)], 'radha', 'sita'})
  2 件のコメント
Shivani Kishor
Shivani Kishor 2020 年 12 月 6 日
This is working but I want only digits.
Ameer Hamza
Ameer Hamza 2020 年 12 月 6 日
That is only possible in newer releases. It works in R2020b. Not possible to do this in R2015x releases.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

製品


リリース

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by