Juan Gomez
Followers: 0 Following: 0
Feeds
提问
In matlab grader it says i am trying to write a scrip instead of a function.
f = @(x) (2.*x.^3 + 3.*x-1) .* cos(x) - x; [bisec_root, n, err] = bisection_method(f, -1, 1, 10E-5, 20) matlab_root = fzer...
4 years 前 | 1 个回答 | 0
1
个回答提问
Write a function called mysum that sums the first n positive numbers. Give the result x1 for n=20,and the result x2 for n=100. For example, if n = 2, mysum computes the sum of 1 and 2. The result is 3.
I tried using a for loop setting mysum = 0; for k= 1;n mysum = k+n; end mysum
4 years 前 | 1 个回答 | 0