Can I make an input function command and the input is been read using dlmread and display the result?

3 ビュー (過去 30 日間)
I dont know how to ask this question but lets give a try, I have around 100 textfile consist of chemical elements, my supervisor ask me if i can do the input command for him to choose which element he want me to read and display as a graph, is that even possible to do? If it is, I hope someone can help me. Your help will be much appreciated. Thank you :)

採用された回答

Nirav Sharda
Nirav Sharda 2018 年 7 月 12 日
編集済み: Nirav Sharda 2018 年 7 月 12 日
Here is a simple code example that uses ' input ' and ' dlmread '. You can use this as a reference. I hope this helps.
element = input('Enter element: ','s');
filename = [element '.txt'];
dlmread(filename);

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by