i am trying to made a code to int the numbers of time i want
1 次查看(过去 30 天)
显示 更早的评论
syms x n y z a;
n=input('enter number of int');
for y=1:n;
z=x^2;
a=int(z);
z=a;
end
like i want to int x^2 two time the answer will be x^4/12 but in matlab but i cant get the int to intgrate the new value of z
0 个评论
采纳的回答
David Wilson
2020-5-7
Remove the z=x^2 from the loop.
syms x n y z a;
n= 5
z=x^2;
for y=1:n
z=int(z)
end
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Algebra 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!