code to be run in matlab grader

조회 수: 3 (최근 30일)
Muhammad
Muhammad 2021년 10월 2일
다시 열림: Cris LaPierre 2021년 10월 4일
i need this code to be runnned in matlab grader in oder to check whether its right or not
function output=myleftcheck(f,a,b,n,tol)
syms x
dx=(b-a)/n;
r=0;
for k=0:n-1
c=a+k*dx;
r=r+f(c);
end
t=(dx*r);
y=t
o=int(f(x),a,b)
p=vpa(o)
q=p-y
if (q<0)
q=-q
end
if (q<=tol)
output=1
else
output=0
end
end
  댓글 수: 1
Walter Roberson
Walter Roberson 2021년 10월 4일
When code does not have any documentation, then we have to assume that the purpose of the code is to produce exactly whatever it computes, that any error messages that are likely to occur are deliberate or represent cases that have been guaranteed to never occur.

댓글을 달려면 로그인하십시오.

채택된 답변

Cris LaPierre
Cris LaPierre 2021년 10월 4일
MATLAB Grader is something your instructor will have to provide you access to, either through a course hosted at grader.mathworks.com, or embedded into an LMS platform. There is no way for us to run your code in grader for you, as the assessment tests are unique to the problem your instructor created.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Use Content in an LMS Course에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by