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.(adsbygoogle = window.adsbygoogle || []).push({});

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 dont get any error message but matlab wont update the graph that the user refers to..Code (Text):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

Any advice?

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Help with MATLAB graphics

Loading...

Similar Threads - Help MATLAB graphics | Date |
---|---|

Matlab MATLab: Not enough inputs for nlinfit | Nov 16, 2017 |

Matlab Help needed to fix a matlab code | Nov 8, 2017 |

New to Matlab, help with vectors | Feb 20, 2016 |

Need help with integral | Dec 23, 2015 |

Communication between Arduino and Matlab Help | Jun 19, 2015 |

**Physics Forums - The Fusion of Science and Community**