1
When writing a function with arguments in MatLab, can the arguments be separated by a line break in some way (similar to separation by whitespace characters such as space
or tab
being allowed)? An example is to change this code line
choice = inputdlg(prompt,dlg_title,num_lines,defaultans);
to these lines
choice = inputdlg(
prompt,
dlg_title,
num_lines,
defaultans
);
This particular syntax does not work, but it shows the idea that is possible in many other programming languages. Is it possible in MatLab as well?
This is the way to do it! It's definitely an improvement in function calls with lots of parameters or very long ones, like file locations. – kmc – 2018-02-08T17:51:10.603