matlab里纵坐标公式,plotyyy函数绘制三个纵坐标

该函数扩展了plotyy,允许在同一个图表中创建第三个y轴。输入参数包括三个x轴数据和对应的三个y轴数据,以及y轴的标签字符串。输出包括三个轴的手柄和线条手柄。示例展示了如何使用该函数绘制x的线性、平方和立方曲线,并设置相应的图例和坐标轴标签。
摘要由CSDN通过智能技术生成

function [ax,hlines] = plotyyy(x1,y1,x2,y2,x3,y3,ylabels)

%PLOTYYY - Extends plotyy to include a third y-axis

%

%Syntax: [ax,hlines] = plotyyy(x1,y1,x2,y2,x3,y3,ylabels)

%

%Inputs: x1,y1 are the xdata and ydata for the first axes' line

% x2,y2 are the xdata and ydata for the second axes' line

% x3,y3 are the xdata and ydata for the third axes' line

% ylabels is a 3x1 cell array containing the ylabel strings

%

%Outputs: ax - 3x1 double array containing the axes' handles

% hlines - 3x1 double array containing the lines' handles

%

%Example:

% x=0:10;

% y1=x; y2=x.^2; y3=x.^3;

% ylabels{1}='First y-label';

% ylabels{2}='Second y-label';

% ylabels{3}='Third y-label';

% [ax,hlines] = plotyyy(x,y1,x,y2,x,y3,

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值