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

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Language Fundamentals 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by