How to fix this error
古いコメントを表示
function [x1, x2] = torus(a,b)
x1= ((.25*pi^2)*(a+b)*((b-a).^2));
x2= ((pi^2)*(b^2-a.^2));
end
> [volume, area]=torus(0.25:4,a+2)
Error using *
Inner matrix dimensions must agree.
Error in torus (line 2)
x1= ((.25*pi^2)*(a+b)*((b-a).^2));
How to go about correcting problem, I thought for the element wise for variables a and b I could just input them as the values for torus(a,b)
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!