I am using function to calculate an expression.
이전 댓글 표시
for example, function y=g(x) y=5+x end This gets my job done when one argument is passed, for example g(5). But what i want to do is , when i put g(5, 'v'), i want it to execute a different formula instead y=5+x. On this occasion, i want it to execute y=5+x.^2 . How can i do this. Any idea please?
댓글 수: 1
Jan
2018년 1월 31일
@rihan jericho, Md Epu, Joe Raihan: Please stop deleting your question, after you got an answer.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Bartlett에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!