gistlib
main.mx = -10:0.1:10; y = x.^2; plot(x, y); xlabel('x'); ylabel('y'); title('Graph of y = x^2'); grid on; % Computing y(3) index = find(x == 3); y_at_3 = y(index); disp(['y(3) = ', num2str(y_at_3)]); 196 chars14 lines
x = -10:0.1:10; y = x.^2; plot(x, y); xlabel('x'); ylabel('y'); title('Graph of y = x^2'); grid on; % Computing y(3) index = find(x == 3); y_at_3 = y(index); disp(['y(3) = ', num2str(y_at_3)]);
gistlibby LogSnag