I want to display a Listbox selected item in a text area to plot it in a mesh graph
1 次查看(过去 30 天)
显示 更早的评论
I am adding items into a listbox using the below code:
% Button pushed function: ExecuteButton
function ExecuteButtonPushed2(app, event)
dx=app.RoadStepSize_dx_EditField.Value;
xMax=app.MaxRoadLength_xMax_editfield.Value;
vMax=app.MaxVelocity_vMax_EditField.Value;
tMax=app.SimulationTime_tMaxEditField.Value;
dt=app.TimeStep_dt_EditField.Value;
dir
c0=app.C0TimeheadwayEditField.Value;
tau=app.RelaxationTime_TauEditField.Value;
pMax=app.MaxDensity_pMaxEditField.Value;
Mat_Type=app.Hidden_Numeric_EditField.Value
[m,dis,myfile] =srch(pMax,dx,xMax,vMax,tMax,dt,c0,tau,Mat_Type);
app.DataFileTextArea.Value=dis;
if app.DataFileTextArea.Value~="File Not Found"
app.ListBox.Items{length(app.ListBox.Items)+1}=app.DataFileTextArea.Value{1};
end
I've added graphs where I want to plot the loaded file, and I'd like to display the loaded file in a text area that will be used to find the.mat file in my database and load it, and plot specific matrecis in a graph where I want it to be plotted, with different buttons for each variable to be plotted for each plot area..
I am trying to do this as below
app.Selected_file.Value = app.ListBox.Value;
But i am unable to even display the selected item from the list box, so my question is either how to display a selected item of a list box in a text area.
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!