How to write, Title of the Graph should be based on the input parameter values.

2 visualizzazioni (ultimi 30 giorni)
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).

Risposte (1)

dpb
dpb il 24 Set 2024
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 Commenti
dpb
dpb il 24 Set 2024
Modificato: dpb il 24 Set 2024
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
Sam Chak il 24 Set 2024
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.

Accedi per commentare.

Categorie

Scopri di più su Develop uifigure-Based Apps in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by