Why do i get "Error using fsurf (line 110) Input must be a function or functions of two variables."
Show older comments
This is the code, but I don't get what the problem is. Why doesn't it make me the plot that I need?
for i = sym(1) : sym(2) : sym(20)
for j = sym(1) : sym(2) : sym(20)
sum_w = sum_w + subs(subs(w, m, i), n, j) * 1000;
wmax_exato = vpa(subs(subs(sum_w, y, b/2), x, a/2));
end
end
wmax_exato;
m_max = sym(20);
n_max = sym(20);
wmax = sym(zeros(100, 4));
termos = sym(0);
sum_w = sym(0);
for i = sym(1) : sym(2) : sym(5)
for j = sym(1) : sym(2) : sym(5)
termos = termos + 1;
sum_w = sum_w + subs(subs(w, m, i), n, j) * 1000;
wmax(termos, 1) = i;
wmax(termos, 2) = j;
wmax(termos, 3) = vpa(subs(subs(sum_w, y, b/2), x, a/2));
wmax(termos, 4) = vpa((wmax(termos, 3) - wmax_exato)/wmax_exato * 100);
end
end
wmax(1:termos, 1:4)
figure
fsurf((symfun(-sum_w, [x, y])), double([sym(0), a]), double([sym(0), b]));
Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!