Converting comma to dot in app designer

조회 수: 2 (최근 30일)
Jucimar Carpe
Jucimar Carpe 2019년 5월 4일
댓글: Jucimar Carpe 2019년 5월 5일
Hi, i'm trying to convert a number with comma to number with dot, like "0,25" to "0.25"
In the past i used in GUIDE the follow structure and always worked just fine:
function calcular_cc_geradorButtonPushed(app, event)
escolha_lista_curto = app.escolha_curto.Value
X1_pu = str2double(strrep(app.Z_x1.Value,',','.'));
if strcmp(escolha_lista_curto,'Ex: 1Ø')
app.z_base.Value=X1_pu;
end
end
But now, i'm always getting the same error:
'Value' must be a double scalar within the range of 'Limits'.
What should i do?
Thanks
  댓글 수: 6
Walter Roberson
Walter Roberson 2019년 5월 5일
If X1_pu is coming out as double and scalar, then the implication is that Limits is the problem.
Jucimar Carpe
Jucimar Carpe 2019년 5월 5일
Yah, thats true.
But the questoin is: Is it possible to converto from comma to dot?
Or in the worst scenario, it it possible to create a pop window to inform the user that it must enter a number with dot?

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

답변 (0개)

카테고리

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

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by