フィルターのクリア

Error Unbalanced or unexpected parenthesis or bracket.

2 ビュー (過去 30 日間)
Muhammad Fauzan
Muhammad Fauzan 2021 年 7 月 25 日
コメント済み: Yongjian Feng 2021 年 7 月 25 日
% Domain
a=0;
b=1;
c=0;
d=1;
%Pembagian Grid
xgrid=4;
ygrid=3;
U=(zeros(ygrid+1,xgrid+1));
x=linspace(a,b,xgrid+1);
for i=1:xgrid+1
U(1,i)=sym(sin(pi*x(i)));
end
w=sym('w',[1(xgrid-1)*(ygrid-1)]);
k=1;
for j=2:ygrid
for i=2:xgrid
U(j,i)=w(k);
k=k+1;
end
end
Error Unbalanced or unexpected parenthesis or bracket in "w=sym('w',[1(xgrid-1)*(ygrid-1)]);"
Please Help!!

回答 (1 件)

Yongjian Feng
Yongjian Feng 2021 年 7 月 25 日
Missing a space? After "[1"
w=sym('w',[1 (xgrid-1)*(ygrid-1)]);
  2 件のコメント
Muhammad Fauzan
Muhammad Fauzan 2021 年 7 月 25 日
Its work.
Thank you.
Yongjian Feng
Yongjian Feng 2021 年 7 月 25 日
Accept the answer please so other know the solution as well. Thanks.

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

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

製品


リリース

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by