![](https://iknow-base.cdn.bcebos.com/lxb/notice.png)
用MATLAB在圆域x.^2+y.^2<1画出上半球面z=sqrt(1-x.^2-y.^2)
2013-11-20
展开全部
举个例子,希望有所帮助。代码% 用MATLAB在圆域x.^2+y.^2<1画出上半球面z=sqrt(1-x.^2-y.^2)
clc; clear all; close all;
[x, y] = meshgrid(linspace(-1, 1));
z = sqrt(1-x.^2-y.^2);
z(x.^2+y.^2 >= 1) = NaN;
figure;
surf(x, y, z);结果
clc; clear all; close all;
[x, y] = meshgrid(linspace(-1, 1));
z = sqrt(1-x.^2-y.^2);
z(x.^2+y.^2 >= 1) = NaN;
figure;
surf(x, y, z);结果
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询