Hi, I have to plot something like

` x=0.1:0.1:1; n=length(x); f=exp(x); y=f+0.1*randn(1,n); figure plot(x, f, 'b-', x,y,'x', 'color',[.5 .5 .5]) legend('function f','measurement y')`

I want f plotted in solid blue and y in crossed gray. It doesn't work. Also the legend does not work properly. Any help is appreciated. (Note that the length of y and f may not be equal at all times.)

## Best Answer