What does this error " Undefined operator '*' for input arguments of type 'string' " means?
显示 更早的评论
I have this code (part of a script)
for i=1:N
Size = Event_List(1,4);
Start_trans_time_ONU(i) = CurrentTime + (Distances(i) / Prop_speed) + Size * 8/ (C *(10^9));
End_Trans_time_ONU(i) = Start_trans_time_ONU(i) + (Distances(i)/Prop_speed) + Grant_time;
aux = End_Trans_time_ONU(i) + Guard_time;
Trans_ONU = i+1;
Event_List = [Event_List; DepartureONU aux 0 0 i+1];
end
And I get the error "Undefined operator '*' for input arguments of type 'string'" on 3rd line.
Can anyone help me on solving it?
Many thanks in advance.
4 个评论
Bob Thompson
2018-2-6
What type of variables are 'C' and 'Size'?
Aziza Zaouga
2018-2-6
Bob Thompson
2018-2-6
Ok, so what is Event_List(1,4) then? What type of array is eventlist?
Aziza Zaouga
2018-2-7
编辑:Stephen23
2018-2-7
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Embedded Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!