The code below is what I have tried to do. I want to scale the value 200 to become 100% in the plot and the value 100 to become 50%. The x and y values are just made up, I actually need to plot 1440 different values. Help needed! Thanks in advance!
clearx = [1, 2, 3, 4, 5, 6, 7, 8, 9];y = [5, 50, 200, 180, 100, 60, 53, 0, 2];figureax = axes;plot(x,y); set(ax, 'YTick', [0:10:100], 'YLim', [0, max(y)]);ytickformat(ax, 'percentage');ax.YGrid = 'on';xlabel('Time (Minutes)');ylabel('Energy Percentage');
Best Answer