gridmesh does not work for my case, why?
2 views (last 30 days)
Show older comments
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?
0 Comments
Answers (1)
Dyuman Joshi
on 3 Jun 2023
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)
0 Comments
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!