필터 지우기
필터 지우기

How to create a variable without assigning a value, so you can find the zero of the function?

조회 수: 2 (최근 30일)
I have to write a function that calculates the zero of a function if the function is inputted and the lower and upper bounds are given. I then have to bisect the bounds and determine where the zero is. I can't test my function because I don't know how to make a function without assigning a value to x. I just want a simple function like x^2+x-10 that I can use to calculate the zero and test my function. function [z]=a(x) z=x^2+x-10; end How would I make this function work without a numerical input for x?

채택된 답변

Matt J
Matt J 2014년 9월 21일
You would use Function Handles.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by