Why am I getting "Unrecognized function or variable 'fp'."?
조회 수: 2 (최근 30일)
이전 댓글 표시
Tried to make a fixed point iteration code in MATLAB, but I am not sure why I am unable to call my function without receiving this error.

댓글 수: 0
답변 (1개)
DGM
2024년 8월 26일
편집: DGM
2024년 8월 26일
Functions which are local to a script or local to another function are not accessible outside that scope. If you want your function to be accessible, it needs to be written as a function, not a script with a local function. Delete all the non-comment lines prior to the function() definition (get rid of clc; clear all).
댓글 수: 2
Voss
2024년 8월 26일
>> fixedp(g,p0,tol,n)
Change the file name to fp.m if you want to use that name.
참고 항목
카테고리
Help Center 및 File Exchange에서 Entering Commands에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!