Big Chemical Encyclopedia

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

Articles Figures Tables About

Xpowers function

Let us define x as the input argument to be passed to the xpowers function. Notice that x is a row vector, not necessarily a scalar quantity. [Pg.82]

To output the square and cubic values for each entry in the row vector x, enter the following command which calls the user-defined xpowers function ... [Pg.82]

The first line defines the function xpowers, which has two outputs sq and cube and one input. The second line is a comment statement that is used to tell what xpowers is all about. The third and fourth lines calculate the values of input squared and cubed, respectively. While the main MATLAB window is active, press CTRL+N to activate the MATLAB m-file editor and paste the previous four lines. Save the file as xpowers.m. [Pg.82]


See other pages where Xpowers function is mentioned: [Pg.82]   


SEARCH



© 2024 chempedia.info