我有以下职能:f(x,y)= Exp(-x^2-y^-2)(x^2+y^2)
。 我愿研究一下将这一职能投向MATLAB的轴心。
任何关于这样做的最佳方法的想法?
我有以下职能:f(x,y)= Exp(-x^2-y^-2)(x^2+y^2)
。 我愿研究一下将这一职能投向MATLAB的轴心。
任何关于这样做的最佳方法的想法?
例如:
xs = [];
ys = [];
zs = [];
for x = -10:0.1:10
for y = -10:0.1:10
xs = [xs x];
ys = [ys y];
z = f(x,y);
zs = [zs z];
end
end
figure; plot3(xs,ys,zs); %plots the full function over both dimensions
figure; plot(xs,zs, rx ); %plots the projection onto the x axis
figure; plot(ys,zs, rx ); %plots the projection onto the y axis
这在范围上——10至10沿x和 y,但可以相应改变。
@Amro有一个很大的解决方案,但你还可以从MAABTL中央卷宗交换处看Scott Hirsch的黑体。 检查:
>> f = @(x,y) exp(-x.^2 -y.^(-2)).*(x.^2+y.^2);
>> [X,Y] = meshgrid(-10:0.5:10,-10:0.5:10);
>> surf(X,Y,f(X,Y))
>> xlim([-11,11])
>> ylim([-11,11])
>> shadowplot x
>> shadowplot y
http://www.mathwork.com/help/techdoc/ref/view.html” rel=“nofollow noreferer”>view,看2D-projection on the x-axis:
f = @(x,y) exp(-x.^2 -y.^(-2)).*(x.^2+y.^2);
[X,Y] = meshgrid(-10:0.5:10,-10:0.5:10);
surf(X,Y,f(X,Y))
view(90,0), shading interp
xlabel X, ylabel Y, zlabel Z
Is there any open-source 3D graphics and physics engine specialized in driving simulation? Something like a configurable game engine targeted at games that involve driving, or something more ...
We used 3DTools (http://3dtools.codeplex.com) to draw a 3d line, it allows user rotate it by mouse. I have question, how to limit user can rotate it on Z axis only? or on X axis, Y axis only? <...
I have a few 3d rectangles on my screen that I want to pivot around the Y axis. I want to press down with the mouse, and rotate the 3d object to a max rotation, but when the user moves their mouse, ...
I m using Electro in Lua for some 3D simulations, and I m running in to something of a mathematical/algorithmic/physics snag. I m trying to figure out how I would find the "spin" of a sphere of a ...
for development of interactive 3d web applications, which engine is recommended? I am aware that WebGL has been anounced to become standarized for all browsers in the near future (1~2 years). I am ...
What are the best libraries/frameworks for doing 3D and/or Zoom interfaces in Java? I d like to be able to do some prototyping of creating new types of interfaces for navigating within data and ...
Now that the Unreal Development Kit for Unreal 3 engine is free I am thinking about utilizing it for an appication. Do you think it is possible to emebedd a Unreal 3 powered 3D window into a .NET (WPF ...
I have several geometry meshes in my Viewport3D, these have bounds of (w:1800, h:500, d:25). When a user clicks in the middle of the mesh, I want the Point3D of (900, 500, 25)... How can I achieve ...