How do I add a suffix using a portion of the the imported excel file name to the name of output variables?

1 回表示 (過去 30 日間)
I have the attached code. I am sure it is not ideal as I am both new to programming and Matlab.
How do I add a suffix using a portion of the the imported excel file name to the name of output variables?
I want to change the following variables for this particular spread sheet (see attached):
A_B_1 to A_B_1h_1H
A_1 to A_1h_1H
B_1 to B_1h_1H
Any suggestions and advise would be most helpful.
Regards.
  1 件のコメント
Stephen23
Stephen23 2019 年 1 月 6 日
編集済み: Stephen23 2019 年 1 月 6 日
"How do I add a suffix using a portion of the the imported excel file name to the name of output variables?"
That is unlikely to be good data design, and most likely will make your code more complex than it needs to be (as well as slower, buggier, and harder to debug).
"Any suggestions and advise would be most helpful."
First read this:
and then use indexing. Remember that meta-data is also data, and so it should be stored as data in its own right as the value of a variable, not forced awkwardly into the name of a variable.

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

回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by