I am creating a user interface and want to output a vector using the push button function
이전 댓글 표시
I am creating a user interface and want to output a vector using the push button function. i have written this code so far the push button but am getting error messages and not sure how to fix it.

the code ive used is:
theta = app.ThetaSlider;
w_s= app.spinAVSpinner;
w_n = app.NutationAVSpinner;
w_p = app.PrecessionAVSpinner;
wi = [(-w_n*theta*0) 0 0];
wj = [0 w_s*sind(theta) 0];
wk = [ 0 0 (w_p + w_s*cosd(theta))];
W = wi + wj + wk;
app.WEditField.Value = W;
The Result im trying to produce is: -3.0000 8.6603 10.0000
댓글 수: 4
Thomas Fournier
2021년 8월 11일
Picture too blurry to see the error message
But the error may be that your edit field is excpecting a scalar and you are giving him a vector. You can either display it in 3 different edit field numeric, or display it as a string in a edit field (text).
rahim njie
2021년 8월 11일
편집: rahim njie
2021년 8월 11일
Thomas Fournier
2021년 8월 12일
편집: Thomas Fournier
2021년 8월 12일
You can display vector in a edit fiel(text) by doing :
app.EditField.Value=num2str([4,2,5])
rahim njie
2021년 8월 12일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!