MATLAB Create a simple plot and store the handle in a variab
MATLAB
Create a simple plot and store the handle in a variable.Use the three different methods(dot notation,set, and structure) to change the Color property.
Solution
Using set property :
 P = plot(rand(4)); NameArray = {\'LineStyle\'};
 ValueArray = {\'-\',\'--\',\':\',\'-.\'}\'; set(P,NameArray,ValueArray)
Using dot notation :
y = rand(5);
 h = plot(y);
 set(h,\'Color\',\'red\')

