Change meshgrid axes min/step/max value using a GUI

2 ビュー (過去 30 日間)
Daniel Green
Daniel Green 2017 年 7 月 13 日
回答済み: Elias Gule 2017 年 7 月 13 日
I'm trying to make a program where you can change the limits and steps of each axis on a 3D meshgrid.
[x,y,z] = meshgrid(minX:stepX:maxX,minY:stepY:maxY,minZ:stepZ:maxZ);
I'm trying to use edit text widgets to enter the data. My callback looks like:
function edit_minX_Callback(hObject, eventdata, handles)
minX = str2double(get(handles.edit_minX,'String'));
assignin('base','minX',minX);
I've already watched this video: http://blogs.mathworks.com/videos/2011/11/23/passing-data-between-guide-callbacks-without-globals-in-matlab/ and it looks like that is the way to do it. However, it doesn't quite help with my specific needs. Help?

回答 (1 件)

Elias Gule
Elias Gule 2017 年 7 月 13 日
Does this help:
assignin('base','minX',eval(minX)); % minX is the text such as '2:3:18'

カテゴリ

Help Center および File ExchangeGraphics Object Programming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by