Info

This question is closed. Reopen it to edit or answer.

I wanna call a function which is defined before with inputs are entering outside but I want to use this function that inputs can be calculated and assigned by the equations in another .m file

1 view (last 30 days)
% for example,
function[latitude, longtitude]= ecef_to_geodetic(X,Y,Z)
disp('XYZ to latitude and longtitude')
X =input('X');
Y =input('Y');
Z =input('Z');
ans=X*Y*Z
-------------------------------------------------------------------------------
%in other function I want to calculate these inputs and assign the [latitude, longtitude] without necessary to input X Y Z
a=100 %for example
b=50
X=a*b
Y=a+b
Z=a+b+c
[latitude, longtitude]= ecef_to_geodetic(X,Y,Z)
%in here programme wants me to input X Y Z again due to the function how can I assign calculated X Y Z which is above to this function without input these values.

Answers (1)

Walter Roberson
Walter Roberson on 3 Apr 2013
Comment out the input() statements.

This question is closed.

Community Treasure Hunt

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

Start Hunting!