- #1
Kontilera
- 179
- 24
Hello! I'm trying to make an easy MATLAB programme in which you can plot your graphs, change the linewidth, and linestyle in the graphs you want etc.
I've managed to use to dialog windows in MATLAB and write a loop which plots a given function. Now I want the programme to ask the user for the figureid and the linewidth and then make the corresponding change.. Here I run into trouble.
My code for this specific m-file is:
I don't get any error message but MATLAB won't update the graph that the user refers to..
Any advice?
I've managed to use to dialog windows in MATLAB and write a loop which plots a given function. Now I want the programme to ask the user for the figureid and the linewidth and then make the corresponding change.. Here I run into trouble.
My code for this specific m-file is:
Code:
function outt = changewidth(handles)
Figureid = input('Which figure would you like to change: ');
Width = input('Which width would you like to have: ','s');
z = str2num('Figureid');
p = str2num('Width');
figure(Figureid);
set(z, 'Linewidth', p);
outt=[handles];
end
I don't get any error message but MATLAB won't update the graph that the user refers to..
Any advice?