substituting variables for meshgrid variables

13 ビュー (過去 30 日間)
Roger Kueng
Roger Kueng 2011 年 11 月 7 日
Good Day,
For my studies I wanted to substitue some symbols, it works fine but the following line doesn't work:
u = 0:0.2:5;
v = u;
[U,V] = meshgrid(u,v);
subs((a1.*y.^2)./(1+y.^2)-x,{x,y},{U,V});
if i substitute the variables x and y with "normal vectors it works fine but not with the meshgrid:
??? Error using ==> horzcat
CAT arguments dimensions are not consistent.
Error in ==> sym.subs>@(x)[char(x),','] at 246
s = cellfun(@(x)[char(x) ','],X,'UniformOutput',false);
Error in ==> sym.subs>getNames at 246
s = cellfun(@(x)[char(x) ','],X,'UniformOutput',false);
Error in ==> sym.subs>tryFunctionHandle at 190
xvarnames = getNames(X);
Error in ==> sym.subs>mupadsubs at 137
[G,worked] = tryFunctionHandle(F,X,Y);
Error in ==> sym.subs at 125
G = mupadsubs(F,X,Y);
Could anyone help me what I need to change?

回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by