I have a program in which I want to change linestyle using input, but I have problems changing from - to and from. it gives the message "The selected style is already in use", how can I make the program see the difference between them without having to write spaced as - -?
style=input('Give new style ( :, --, -., -): ','s'); h(id) = plot_handles(id); if get(h(id), 'LineStyle')==(style) disp('The choosen style is already used!'); else set(h(id), 'LineStyle', style); end
source share