フィルターのクリア

How can I write function in label in Matlab app designer?

10 ビュー (過去 30 日間)
hgrlk
hgrlk 2021 年 6 月 8 日
コメント済み: hgrlk 2021 年 7 月 14 日
Hello,
I'm creating an app designer and I want to write this following function in label:
Here I have numerical values for parameters K, TL, TI, WN, zeta and tau. My app designer already calculated these.
But I cannot write this function exactly in this form into label. I cannot show the division or exponent. How can I write this? Thank you!
  6 件のコメント
dpb
dpb 2021 年 6 月 8 日
Here's the one I recalled -- as of R2020b, the label and text ui figures didn't have an Interpreter property for LaTex; that seems to have been added in R2021a, but with glitches...
I also see my thinking you could paste in an image is also in error; it accepts only text, so that's also not a way to manage the desired effect.
I come back to the question of is it really worth the time being spent--or could that time more profitably be spent using the app to solve whatever problem it is designed for even if not quite so fancy?
hgrlk
hgrlk 2021 年 7 月 14 日
Sorry for answering after so long. Yes you're right. Adding an image can cause an error because the line image is showing if only the user has this image.
I reconsider and re-read your answers but i guess i dont understand what you suggest for my problem. Sorry, i am at the beginning of designing app designer. Thus, i cannot understand everything i read clearly.

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

回答 (1 件)

Walter Roberson
Walter Roberson 2021 年 6 月 8 日
uilabel() https://www.mathworks.com/help/matlab/ref/uilabel.html supports LaTeX and dynamic strings.
Computing a latex string can be a nuisance, keeping the \ straight (since \ introduces escape sequences in sprintf() and compose() ) but it is at least possible.
  5 件のコメント
Walter Roberson
Walter Roberson 2021 年 6 月 9 日
17F5.2 is certainly more convenient than repmat('%5.2f', 1, 17)
I do find though, that if I have long formats, that I often want to compute the format. For example I might have code that needs to check size() of a matrix to find out how many fields to construct in the format.
dpb
dpb 2021 年 6 月 9 日
編集済み: dpb 2021 年 6 月 9 日
Well, it's still simpler to write '%dF5.2' in the code that writes out the format string than filling in the repmat() template or (ugh!) just dumping out 238 consecutive 'F5.2' strings in a row.
At one time I had a pretty extensive mex file that took FORMAT expressions and handed off to the Fortran i/o library, but TMW broke support for the former compiler I used and once I gave up the consulting gig, it just wasn't sufficient need to fight the hassles of getting a compiler supported and working again.
I had provided TMW with that code with the hope they might consider an extension, but nothing ever happened. It's still a sore substitute without repeat fields and nested and group repeat specifications.
NAMELIST is another trick I played with some along the same lines.

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

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by