How can I put a display that shows changing variables in a plot?
40 次查看(过去 30 天)
显示 更早的评论
I wanted to know if I could put a display that shows me a number that changes in a plot.
回答(2 个)
Aquatris
2019-12-5
Assuming you plot in a for loop and the changing variable is x, below code will update the title of the plot to be equal to x
for i = 1:length(x)
plot(t,x(i))
title(x(i))
pause(0.001)
end
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Formatting and Annotation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!