Using Probplot Function in App Designer

조회 수: 2 (최근 30일)
TF_SF
TF_SF 2019년 10월 2일
답변: Kojiro Saito 2019년 10월 4일
Hi,
I am trying to use the app designer to display a series of distribution fits using the probplot function in confunction with the Axes components, but I'm getting an error.
Here the code I am using:
ax_2 = app.UIAxes2
p1 = probplot(ax_2,'weibull',data_fit);
The error I am receiving is, which I think indicates an incompatibility between app designer and probplot:
Error using matlab.graphics.chart.primitive.FunctionLine/set
Functionality not supported with UIAxes. For more information, see Graphics Support in App Designer.
Error in matlab.graphics.chart.internal.ctorHelper (line 8)
set(obj, pvpairs{:});
Error in matlab.graphics.chart.primitive.FunctionLine
Error in probplot (line 177)
hrefj = matlab.graphics.chart.primitive.FunctionLine(...
Error in fittool_template/FitStressDistributionButtonPushed (line 69)
p1 = probplot(ax_2,'weibull',data_fit);
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 309)
Error while evaluating Button PrivateButtonPushedFcn.
I should note that the variable "data_fit" is a 14x1 matrix in format double and that I am using version R2017b.
Is there a way to fix this or to workaround this issue?
Thanks

채택된 답변

Kojiro Saito
Kojiro Saito 2019년 10월 4일
As of R2017b, probplot cannot plot in uiaxes nor uifigure. So, you need to excludes uiaxes property from probplot and open a new figure.
p1 = probplot('weibull', data_fit);
From R2018b, you can specify uiaxes in probplot as described in release note. The following command
ax_2 = app.UIAxes2
p1 = probplot(ax_2,'weibull',data_fit);
will work in R2018b or later.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Word games에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by