Displaying the name of the moving text file in the animation
3 ビュー (過去 30 日間)
古いコメントを表示
Hello;
I created an animation using 10 different txt files; however, I want to see the name of the txt file that has the image in the txt file on the screen at that moment. How can I do that. Thank you in advance
0 件のコメント
回答 (1 件)
chicken vector
2023 年 6 月 1 日
編集済み: chicken vector
2023 年 6 月 1 日
Suppose you import the conent of the .txt files by doing:
filename = 'FrameXX.txt';
framData = readmatrix(filename);
Then the three most common ways of displaying a text are:
frameName = extractBefore(filename, '.txt');
figure;
title(frameName);
annotation('TextBox', [.45 .65 .1 .1], 'String', frameName, 'FitBoxToText', 'On');
text(.45, .9, frameName);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で View and Analyze Simulation Results についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!