Why am I getting "Unrecognized function or variable 'fp'."?
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
DGM
am 26 Aug. 2024
Bearbeitet: DGM
am 26 Aug. 2024
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 Kommentare
Voss
am 26 Aug. 2024
>> fixedp(g,p0,tol,n)
Change the file name to fp.m if you want to use that name.
Siehe auch
Kategorien
Mehr zu Entering Commands finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!