To split an input from an edit field in MATLAB by a comma, you can use the split
function.
Here's an example:
main.m716 chars18 lines
Make sure to replace "editField" with the actual handle name of your edit field.
Note: If your input string contains spaces after the comma, you might need to trim the whitespace from each element using the strip
function.
main.m77 chars2 lines
This will remove any leading or trailing spaces from each element in the splitInput cell array.
gistlibby LogSnag