matlab 函数报错不知道是什么原因,程序在下面

[复制链接]
查看11 | 回复1 | 2011-5-20 11:02:25 | 显示全部楼层 |阅读模式
function [ss x]=circle()
r=input('type radius');
area=pi*r^2;
volume=(4/3)*pi*r^3;
fprintf('the radius is %12.5f\n',r)
fprintf('the area of a circle is %12.5f\n',area)
fprintf('the volume of a sphere is %12.5f\n',volume)
ss=volume;
x=area;

回复

使用道具 举报

千问 | 2011-5-20 11:02:25 | 显示全部楼层
我完全复制你的程序,保存,然后直接点运行,输入一个数字,完全正确,没有任何错误。我不知道你怎么运行的。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行