Index in position 1 exceeds array bounds (must not exceed 1)
1 次查看(过去 30 天)
显示 更早的评论
This is my script :
kwh=input('How much KWH this month :');
ckwh=6.6*kwh/100;
fprintf('Your charge for %5d will be %.2d',kwh,ckwh)
Matlab return this : Index in position 1 exceeds array bounds (must not exceed 1).
Help me please !!!
0 个评论
回答(2 个)
madhan ravi
2019-9-23
编辑:madhan ravi
2019-9-23
clear all % you're probably shadowing the inbuilt function input()\fprintf()
%or
clear input fprintf
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!