While compiling the below function i am getting the error like this -- Subscript indices must either be real positive integers or logicals. Error in hrithik (line 7)

this was my program
function T = hrithik(x,p);
alpha = input('enter the value of alpha');
IA = input('enter the value of IA');
k = input('enter the value of k');
to = input('enter the value of to');
ierfc = (1./sqrt(pi)).*(exp(-x.^2)-x.*(1-erfc(x)));
T = to+(IA./k).*((4.*alpha.*p).^(1./alpha)).*ierfc(2./((4.*alpha.*p).^(1./alpha)));
end

Answers (0)

Categories

Find more on Language Fundamentals in Help Center and File Exchange

Asked:

on 14 Mar 2018

Edited:

on 14 Mar 2018

Community Treasure Hunt

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

Start Hunting!