Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to find arguments of a given equation in MATLAB

Status
Not open for further replies.

mohamis288

Full Member level 3
Full Member level 3
Joined
Mar 1, 2022
Messages
165
Helped
0
Reputation
0
Reaction score
1
Trophy points
18
Activity points
1,234
I want to know for what values of x, sinc(x) function is going to be half of its max value. Notice that this question can be extended to a more general question such a way that, for example, we can not find inverse of a particular function easily, so we are forced to resort to a simulation software like MATLAB to find the arguments by which equation can be solved. I want to use value of this argument in my future computation in MATLAB. How can I do this in MATLAB?
 

I want to know for what values of x, sinc(x) function is going to be half of its max value. Notice that this question can be extended to a more general question such a way that, for example, we can not find inverse of a particular function easily, so we are forced to resort to a simulation software like MATLAB to find the arguments by which equation can be solved. I want to use value of this argument in my future computation in MATLAB. How can I do this in MATLAB?
I think you can get some help from here: https://www.mathworks.com/matlabcentral/answers/1946044-how-to-obtain-argument-value-of-an-equation
 

You could use the built-in "fzero" function to search the zero of a non-linear funcion in a given interval.

For instance, using the proposed question :

sinc(x) = max(sinc(x))/2:

you can do the work using two functions:

clear % Clear all variables
fun=@(x) sinc(x) % Initial function
xm=[0:0.01:10]; % Search interval for maximum
mx=max(fun(xm)); % Find maximum of "fun"
x0=[0 10]; % Search interval for zero
fun1=@(x) fun(x)-mx/2; % Function to which search for zero
[x vl exf otp] = fzero(fun1,x0) % Find the zero of "fun1"

Only one zero must to be contained in the search interval x0.
 
Last edited:
  • Like
Reactions: kaz1

    kaz1

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top