Is there anything wrong to my code?
Show older comments
if (((N(end)=='A'||N(end)=='B'||N(end)=='C'||N(end)=='D'||N(end)=='E'||N(end)=='F') && (b1>=10))|| str2num(N(end))>=b1)
end
my matlab says that:
Operands to the || and && operators must be convertible to logical scalar values.
Error in sample (line 22)
if (((N(end)=='A'||N(end)=='B'||N(end)=='C'||N(end)=='D'||N(end)=='E'||N(end)=='F') && (b1>=10))||
str2num(N(end))>=b1)
fprintf(2, '|| ERROR! || The digit/s of the number you desire to convert SHOULD NOT EXCEED the value of initial base\n')
return;
whats wrong here? my input is N=9A then my b1=9(str type) then my b2=10.
Accepted Answer
More Answers (1)
1 Comment
Walter Roberson
on 7 Oct 2012
Please show your current code, and the error message you are currently experiencing, and show
class(b1)
size(b1)
Categories
Find more on Entering Commands in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!