필터 지우기
필터 지우기

Replace one value in a 2 variable's function

조회 수: 8 (최근 30일)
Eirini Gk
Eirini Gk 2016년 4월 4일
댓글: Eirini Gk 2016년 4월 4일
Hello. When we have a function of 2 variables is it possible to replace only one of them with a value (so after that it is a function of 1 variable). I want to do this without symbolic functions . for example input @(x,a)(..)=f then with 'for' loop the a changes every time so I want to write sth like feval(f,a-only) and f=@(x) and solve the equation with f(x) (newtons method but its not that matters)
I cant understand how I can say that i replace only a.

답변 (1개)

Torsten
Torsten 2016년 4월 4일
g=@(x)f(x,a)
Then work with g.
Best wishes
Torsten.
  댓글 수: 3
Torsten
Torsten 2016년 4월 4일
No.
Best wishes
Torsten.
Eirini Gk
Eirini Gk 2016년 4월 4일
thank you very much!

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

Community Treasure Hunt

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

Start Hunting!

Translated by