Same script different drawing result in matlab app deisgner.

조회 수: 1 (최근 30일)
ErikJon Pérez Mardaras
ErikJon Pérez Mardaras 2021년 2월 27일
댓글: ErikJon Pérez Mardaras 2021년 7월 15일
I am making a gears drawing and calculation app in matlab app designer in wich the user enters some variables and its values, and when the user clicks the button, the app runs a script which realizes a bunch of calculations and it shows the results and the gears drawed.
The point is that, if I run the script with the values, the script draws the gears perfectly as you can see in the first image below. But when I run de app (which contains, as long as I know, the exactly same script) it draws the gears quite deformed as you can see in the second image below
First image: when running on command window the script alone
Second image: when running the full app (with the script inside)
I have tried delimiting the X and Y axis values. Of course I have used grid, axis equal and hold on within the code, but anything of this seems to work. Also, it is not a zoom issue, I have zoomed the second image as far as I could and it remains the same deformed drawing.
How is that possible? What am I doing wrong? How can I fix this? Thanks a lot
  댓글 수: 2
Cris LaPierre
Cris LaPierre 2021년 2월 27일
I would also expect a script to create the same results, whether in MATLAB or in an app. Plotting can be slightly different in an app. We'd need to see your plotting code to really be able to offer any help, though.
Short of that, are you sure that the exact same inputs/parameters are used to create both plots?
ErikJon Pérez Mardaras
ErikJon Pérez Mardaras 2021년 7월 15일
That was it. They were not the same. Thanks a lot

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by