Plot the x-axis and y-axis in Matlab

469 Views Asked by At

I am asked to plot the graph of a function in Matlab and I would like to add the x-axis and y-axis in the graph. But how can I achieve this?

1

There are 1 best solutions below

2
On

In Octave you can do:

x = [1:100]/10;
plot(x,sin(x),';legend;')
xlabel('xlabel')
ylabel('ylabel')