Getting an error For colon operator with char operands, first and last operands must be char.
Show older comments
Im getting an error called "Error using : For colon operator with char operands, first and last operands must be char." I have the code that im trying to use for reference. I asked my professor about it and he doesnt have a solution for me and suggested me to talk to someone that might here.
3 Comments
KSSV
on 16 Nov 2021
Show us the code which threw error. With out showing code how you expect us to help you?
The error message is easy to reproduce:
1:'a':100
But because you do not explain anything about your code, we have no idea what you are trying to achieve or why.
Joshua Meyer
on 17 Nov 2021
Edited: Joshua Meyer
on 17 Nov 2021
Answers (1)
Stephen23
on 17 Nov 2021
This line
j=('Input number of crossings =')
should be
j = input('number of crossings =')
Categories
Find more on Loops and Conditional Statements 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!