フィルターのクリア

x = linspace(-10,10 ,51)'; y = linspace(0,0.3,51)'; [X, Y] = meshgrid(x, y); Z=X/(1+Y); surf(X, Y, Z); ylabel('t'); xlabel('x'); zlabel('u(x,t)').this is showing error .Now I want to know that the z=f(x)/g(x) why the code is not running

10 ビュー (過去 30 日間)
YOGESHWARI PATEL
YOGESHWARI PATEL 2017 年 6 月 4 日
コメント済み: Stephen23 2017 年 6 月 4 日
x = linspace(-10,10 ,51)';
y = linspace(0,0.3,51)';
[X, Y] = meshgrid(x, y);
Z=x/(1+y);
surf(X, Y, Z);
ylabel('t');
xlabel('x');
zlabel('u(x,t)')
It is showing error that matrix is singular and graph display is balnk. What is mistake with this code.Here in place of X it should be x is it so.
%%%%%%%%%%%%%%%%
Problem : What is wrong in this code
x = linspace(0,1 ,51)';
y = linspace(0,1,51)';
[X, Y] = meshgrid(x, y);
Z=exp(-4.*(pi^2)*0.5*Y)*sin(2*pi*X);
surf(X, Y, Z);
ylabel('t');
xlabel('x');
zlabel('u(x,t)')
Its not showing correct graph
  2 件のコメント
YOGESHWARI PATEL
YOGESHWARI PATEL 2017 年 6 月 4 日
編集済み: Stephen23 2017 年 6 月 4 日
for second one i have to write
exp((-4*(pi^2)*0.5).Y).*sin((2*pi).*X)
Is this correct?
Stephen23
Stephen23 2017 年 6 月 4 日
exp(-2*pi^2*Y).*sin(2*pi*X)

サインインしてコメントする。

回答 (1 件)

Star Strider
Star Strider 2017 年 6 月 4 日
YOU NEED TO USE ELEMENT-WISE OPERATIONS!

カテゴリ

Help Center および File ExchangeArgument Definitions についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by