Plot two functions in one diagramm with different y-axis limits
18 ビュー (過去 30 日間)
Hey, i want to plot for example two functions in one diagramm as the following Code and picture:
fplot(@(x) sin(x), [-5 5], 'b') %here i want a ylim form [-1 1]
fplot(@(x) cos(x), [-5 5], 'r') %here i want a ylim form [-1 0]
So i want (for example) sin and cosinus plottet in one diagramm but the ylim of cos should be only from -1 to 0, so what i "covered with the green pencil should be away (or all red lines over the green line) and the y lim should be from -1 to 1.