matlab中怎么用函数返回值进行计算? 5
1个回答
展开全部
在Matlab下输入:edit,然后将下面两行百分号之间的内容,复制进去,保存
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [sinx,cosx]=myfun_1(x)
sinx=sin(x);
cosx=cos(x);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
返回Matlab输入:
x=0:1:2*pi;
[sx,cs]=myfun_1(x)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [sinx,cosx]=myfun_1(x)
sinx=sin(x);
cosx=cos(x);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
返回Matlab输入:
x=0:1:2*pi;
[sx,cs]=myfun_1(x)
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |