Big Chemical Encyclopedia

Chemical substances, components, reactions, process design ...

Articles Figures Tables About

Program That is, Find Your Errors

Debug the Program That is, Find Your Errors [Pg.243]

If the code you wish to check is in an m-file, the first check is to see that all the parameters are passed correctly and have been set in the workspace available to the m-file. The easiest way to do this is to request that the m-file print all the variables you expect to be transferred to the m-file, at the start of the m-file, and check that they are correct. If a variable has not been set, MATLAB wiU give you an error message without running the code. It tells you the line and column where the undefined variable is. The problem is probably improper passing of parameters or incorrect use of the global command or, sometimes, a typing error. [Pg.243]

3 means five characters, three after the decimal point. [Pg.244]

To write a text file, you must open it, write it, and close it. The following command writes a text file that has two columns, x and y, with as many entries as defined by the vectors x and y (which have the same length). [Pg.244]

To read a text file, you must open it, read it, and close it. [Pg.244]




SEARCH



IS program

© 2024 chempedia.info