How can I plot cornering stiffness using GUI ?
古いコメントを表示
Hello Everyone
I am Koushik, a young automotive engineering graduate with keen interest in vehicle dynamics.I have just started learning MATLAB on my own.I wanted to create a plot for Cornering stiffness of a Tyre ( Lateral Force Vs Slip Angle).So,I created a GUI and I am struggling to plot the graph.I have attached the .m file and the .fig file for your reference.Kindly guide me on plotting this.
回答 (1 件)
Adam
2015 年 5 月 27 日
You can use e.g.
handles.Fz = str2double(get(hObject,'String'));
in your callback (e.g. the Fz0_Callback)
then in your plot callback use
handles.Fz
instead of just variables that don't exist in the scope of the plot function.
Or in the plot function you can get the values directly from the ui controls using the same manner, but without needing to save them on the handle struct.
2 件のコメント
Adam
2015 年 6 月 2 日
There are a few things wrong with this piece of code:
if alphay>0
sign(alphay)= 1;
else
sign(alphay)= -1;
- You are using alphay as an array index despite it not being an integer (as the error says).
- You are overwriting (or hiding, rather) a builtin function by assigning to an array called 'sign'.
- The builtin function that you are overwriting would give exactly the answer you want if you were to simply call it where needed rather than trying to re-implement it yourself by assigning values to an array.
If you were to just remove the above lines of code then the call to sign(alphay) on the subsequent line should work fine by calling the builtin function rather than an array you are trying to create to hide the function.
カテゴリ
ヘルプ センター および File Exchange で Simulink Functions についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!