MatLab: Line break between arguments of a function

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?

1 Answer

Long lines can be continued...

>> choice = inputdlg(prompt,...
dlg_title,...
num_lines,...
defaultans);
Undefined function or variable 'prompt'.
>> 

however this is perhaps not an improvement.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like