![]() So, Julia would be quite correct in rejecting the code. Creating a fixed-width code block is recommended for pasting multi-line blocks of code or other text output because its easier to read with fixed. In Matlab, You can write a comment in different following ways. In that case, the second hash in the code would not start a line comment but be just some character with no special meaning whereas the second #= would open a nested multi-line comment (BTW, that name is quite unfortunate since a multi-line comment is obviously not required to span multiple lines IMHO "block comment" would have been a better choice) which would be closed by the terminating =#, thus leaving the "outer" multi-line comment unclosed. MATLAB displays the first contiguous comment lines in a M-file in. For example: Add up all the vector elements. There is another way of commenting multiple lines of code at once using the MATLAB editor. In particular: Should a line comment be a line comment within a multi-line comment? And should a multi-line comment be a multi-line comment within a line-comment? My personal gut feeling would answer "no" in both cases because otherwise you are likely to run into problems of "overlapping ranges" which is certainly a Bad Thing (correct me if I'm wrong - perhaps there's a way of preventing this). The lines that begin with with a c are comments and have no purpose other than to make the program more readable for humans. Comment lines can appear anywhere in a code file, and you can append comments to the end of a line of code. Commenting Multiple Lines of Code Using the Editor in MATLAB. I was just curious and trying to find out whether it should be possible to nest comments of different types. If all rows do not have same number of values, a subset of up to n. ![]() ![]() Oh, I could have filed an issue, but I'm not even sure that the code should be valid in the first place. Changed in version 1.23.0: Lines containing no data, including comment lines (e.g. Dealing with multiline text Follow 541 views (last 30 days) Show older comments easily confused on Vote 0 Link Commented: Steven Lord on Accepted Answer: Fangjun Jiang I know how to open a file, access the data, and parse into arrays with regular expressions. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |