필터 지우기
필터 지우기

how to fix this

조회 수: 1 (최근 30일)
iko123
iko123 2024년 2월 12일
댓글: iko123 2024년 2월 13일
% Function to perform Regula-Falsi method
function root = regula_falsi(f, a, b,tol)
fa = f(a);
fb = f(b);

채택된 답변

Image Analyst
Image Analyst 2024년 2월 12일
You're not returning anything even though you said you would. In other words, you're not assigning "root" even though you are trying to return it. Try
% Function to perform Regula-Falsi method
% f is a vector and a and b are indexes to that vector.
% tol is passed in but not used for some reason.
function [fa, fb] = regula_falsi(f, a, b, tol)
fa = f(a);
fb = f(b);
  댓글 수: 3
Image Analyst
Image Analyst 2024년 2월 13일
If this Answer solves your original question, then could you please click the "Accept this answer" link to award the answerer with "reputation points" for their efforts in helping you? They'd appreciate it. Thanks in advance. 🙂 Note: you can only accept one answer (so pick the best one) but you can click the "Vote" icon for as many Answers as you want. Voting for an answer will also award reputation points.
iko123
iko123 2024년 2월 13일
Sorry I am new to this

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by