function不懂

function [x,y] = Jacobi(n, A ,b)

Error: Function definition are not supported in this context. Functions can only be created as local or nested functions in code
files.
遇到这个怎末办

你把函数定义在m文件里就行

function [x,y] = Jacobi(n, A ,b)
% balabala
end

然后保存为Jacobi.m文件名