Why am I getting "Unrecognized function or variable 'fp'."?
5 ビュー (過去 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 で MATLAB Compiler についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!