필터 지우기
필터 지우기

App Designer is slow to plot

조회 수: 15 (최근 30일)
Jorge Eduardo Londoño Arango
Jorge Eduardo Londoño Arango 2020년 11월 25일
답변: Aiswarya Subramanian 2020년 12월 8일
App Designer is slow to plot
Good evening, yesterday I was making a program in the extension "App Designer" of MatLab more specifically in version R2020a of this.
The application I designed, aims to represent a non-linear regressions and therefore requires to show a graph, and display similar information in a table. What happens is that my computer takes too long to display this information, specifically when rendering the results; I know this because I placed a point to debug the procedure just before the data is printed. This allows us to conclude that the program's delay is only when it should plot the results and print data in the table.
Also attach a button to clean up the results and the procedure to clean up the graph and clear the table too late.
I have run the procedure on several computers with various technical specifications and none of them are as late as mine.
My specifications are:
Ryzen 3 3200g 3.6 GHz - 4.0 GHz 4 cores - 4 wires
NVIDIA GeForce 1650 Super MSI
8 GB RAM 3200
I attach images about the app designer model and the code that graphics.
fill(app.UIAxes,Z,ZY,[199, 199, 199 ]./255)
hold(app.UIAxes,'on')
scatter(app.UIAxes,X(:,1),Y,30,[15, 100, 89]./255,'filled')
plot(app.UIAxes,Xcal(:,1),Ycal,'Color',[ 1, 75, 213]./255)
legend(app.UIAxes,'Banda del ajuste','Experimental','Ajuste','location','best','interpreter','latex')
ylabel(app.UIAxes,'Variable dependiente','fontsize',17,'interpreter','latex')
xlabel(app.UIAxes,'Varibale independiente','fontsize',17,'interpreter','latex')
axis(app.UIAxes,'tight')
grid(app.UIAxes,'on')
app.UITable.Data = S;
Similarly attached is the code to clean the graph and delete the table
cla(app.UIAxes)
app.UITable.Data = [];
To be more demanding with the subject of specifications I have made the "bench" test and obviously in computers with worse results than those obtained by him the graph is plotted much faster.
I would like to know how to solve this problem, if it is some interference between my hardware or some kind of optimization in the app designer (I have tried with different codes and the program has plotted normally and quickly); in the worst case I have a problem with the specifications of my equipment.
  댓글 수: 3
Mohammad Sami
Mohammad Sami 2020년 11월 25일
It will be difficult to make the builtin functions faster.
What you can do add a drawnow command before the setting Data on uitable.
That should make atleast the plot appear.
Jorge Eduardo Londoño Arango
Jorge Eduardo Londoño Arango 2020년 11월 25일
A qué se puede deber entonces eso ? Será un daño de mi PC o simplemente un problema de optimización entre la función integrado y mi hardaware ? Muchas gracias de ante mano voy a intentar lo que me dices, muy amable

댓글을 달려면 로그인하십시오.

답변 (1개)

Aiswarya Subramanian
Aiswarya Subramanian 2020년 12월 8일
Dear Jorge,
UIAxes uses a different rendering engine than classic Axes. Reducing the size of the UIaxes could possibly improve the performance (work with lesser number of datapoints, e.g. by downsampling the data before calling any plot command). The performance depends on the number of pixels that that we have to render, so a smaller size means better frame rates.
Hope this helps!
-Aiswarya

카테고리

Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by