Coding guidelines

All the guidelines should be followed without fail for timely acceptance of code. Failure to do so might result in rejection of your work.

  1. Visit this page and click on your proposed Scilab TBC. You will now get an option to download the Scilab code for the chosen TBC. 

  2. System Requirement

    1. You have to use Scilab 6.1.0 and above for creating the Xcos examples. 

    2. You may use a different version of Scilab for executing the Scilab TBC code, if required.

    3. You may use a Windows/Linux/Mac OS

  3. If the 3rd solved problem from chapter 1 is to be represented (Example 1.3), then your file must be named as Ex1_3.xcos.

  4. Dependency files

    1. Use .sce extension for writing code while setting up the parameters for an Xcos diagram.

    2. Use .sci extension for writing code for user defined functions.

    3. These dependencies (if any) must be mentioned in a textbox clearly in the Xcos diagram.

  5. Do not include problem statements/text from the book in the diagram.

  6. Plotting

    1. All the plots must have appropriate labels on its axes.

    2. If a single plot contains several graphs then a legend must be added to help differentiate between different plots.

  7. The symbols used in the code should be the same as those being used in the textbook. If you are unable to write a symbol, you can write the name of the symbol in words. For example, 'θ' can be written as 'theta'.

  8. Check that you are using the correct formula while using in-built functions (For example, the angles must be converted to degree (or radians) before calculating the sine or cosine etc).

  9. Label the input/output blocks and superblocks (if applicable) used in Xcos diagram using a textbox.

  10. Label the numeric output blocks that display the results, with proper units.

  11. If the textbook contains errors in calculations/results, mention the same in the block diagram itself by using the textbox.

    1. If the degree of error is less than +/- 2 then "The answers vary due to round off error" must be mentioned

    2. If the degree of error is more than +/- 2 then "The answer provided in the textbook is wrong" must be mentioned.