I am trying to use the command mex in MATLAB. When I type >> mex -setup C, I get the following: Warning: Xcode is installed, but its license has not been accepted. Run Xcode and accept its license agreement. Can anyone help me with this?

I am trying to use the command mex in MATLAB. When I type

>> mex -setup C,

I get the following:

Warning: Xcode is installed, but its license has not been accepted. Run Xcode and accept its license agreement.

Can anyone help me with this?