How to write, Title of the Graph should be based on the input parameter values.
1 回表示 (過去 30 日間)
古いコメントを表示
I have created an app, where the app starts with asking Number of Class Rooms to open. After opening 'n' number of Class rooms in tab group format, In each tab There are input parameters like Class room Number, Number of columns, Number of Benches for each column. After entering the classroom number, number of columns, and number of benches for each column, Import excel buttons are generated based on the value given in number of benches for each column. After reading the data from excel, a graph is generated in the tab and the title of the graph should be in the format like : Class room number (406)_Column(1)_Bench(1).
0 件のコメント
回答 (1 件)
dpb
2024 年 9 月 24 日
You didn't give us anything to work with about what the variables are, but formatting a string is simply
titlestring=compose("Classroom %d, Column %d Bench %d.",app.Classroom,app.Column,app.Bench);
title(titlestring)
The above needs to refer to the specific figure's data, of course.
5 件のコメント
dpb
2024 年 9 月 24 日
編集済み: dpb
2024 年 9 月 24 日
Pare it down to the pertinent area you are having trouble with and explain what your specific problem is in doing what you wish...90% of the code you're expecting somebody to wade through and try to decipher is totally immaterial to the question...
Just looking through the code, I don't see anything that would create the figure(s) you want labelled, to begin with; there's the code that would be pertinent, it would appear.
Sam Chak
2024 年 9 月 24 日
If the code generated by an AI bot does not produce the expected results, you may have difficulty pinpointing the lines causing issues. In that case, I recommend clearly describing in words what you want to design or include in the app. Additionally, please create a sketch of the app interface that indicates how you would like the "Title of the Graph" to be displayed in the figure.
Most human programmers do not annotate or comment on the obvious purpose of certain commands, and bots tend to use "space," while human code is generally cluttered and not easily readable by others.
参考
カテゴリ
Help Center および File Exchange で Develop uifigure-Based Apps についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!