Info

此问题已关闭。 请重新打开它进行编辑或回答。

surfs and meshplot problem

1 次查看(过去 30 天)
Rica
Rica 2012-11-28
关闭: MATLAB Answer Bot 2021-8-20
Hi I want to plot a function of two variables with surfc, I get the error Z must be a matrix not a scalor or vector.
My function is like this: %
Z=exp(M.*log(eps)+v.*eps), M=[1:30] eps=[11:40]
I want to plot surfc(Z,M,eps). could you help me?

回答(2 个)

Azzi Abdelmalek
Azzi Abdelmalek 2012-11-28

Matt Fig
Matt Fig 2012-11-28
编辑:Matt Fig 2012-11-28
[M,EPS] = meshgrid(1:30,11:40);
v = 3;
Z = exp(M.*log(EPS)+v.*EPS);
surfc(M,EPS,Z)
set(gcf,'render','zbuf')

此问题已关闭。

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by