gridmesh does not work for my case, why?
Afficher commentaires plus anciens
having u and v arrays of different sizes (54x1 and 61x1), I attempted to run the following;
function F = fcn(u,v)
[U,V]=meshgrid(u,v);
F= 1/((U.^(-0.66667))+(V.^(-0.6667)));
G=F.^(3/2);
surf(U,V,G)
3rd row did not work and says the following; "matrix dimensions must agree" ?!
what did I make wrong?
Réponses (1)
You need to use element-wise division as well in defining F
u = rand(54,1);
v = rand(61,1);
[U,V]=meshgrid(u,v);
% v
F= 1./((U.^(-0.66667))+(V.^(-0.6667)));
G=F.^(3/2);
surf(U,V,G)
Catégories
En savoir plus sur Linear Algebra dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
