Matlab is a common laboratory tool used in numerous branches of science. It is an ideal tool for scientific experimentation. It can be programmed in several ways and the mathematically-inclined among us are fond of working in an unknown environment. For this reason, assignments in matlab need to be done in an anonymous function. To show you how it is done, let’s see what matlab assignment in anonymous function should entail.
The first step to do my matlab assignment in an anonymous function is to download the free software. It is available on the internet. Once the software is downloaded, install it to your PC. When installation is complete, run the software. The installation process takes about five minutes.
Now, we will be able to input our assignments and functions into the software. Click on ‘Start’ button and choose ‘MATLAB.’ Next, click on the [emenu] button and enter any valid user name and password. Note that if you have set up your user name and password in the Matlab preferences, they will appear at the beginning of the Matlab window. Click on the [File tab] option and upload the downloaded file containing your assignments, if you have one, or the file containing all your files if you have more than one.
In the top right corner of the Matlab window, double-click on the word ‘Align’. The function menu will appear. Select the user name and password option from the drop down menu and click OK. Now, we can enter any information about our assignments and functions and our code in the Evaluation data section. We can also enter an evaluation name for easy identification.
At this point, you might think matlab has gone back to the drawing board, but it has not! Your assignment is now saved in the working directory. Navigate your way through the directory and you will see your assignment in anonymous function form. You can continue using the Matlab prompt as normal. However, the notebook view of your assignment in anonymous function now appears.
Click on the [sheet cell link] to open the code of your assignment in Matlab notebook. Note that, this code runs in the unit cell. This is a link which connects the cell to another sheet. The notebook view of your code can be navigated by clicking on the link and typing the cell number after the colon. Click the ok button to run the code.
It is important to note that running any code during matlab assignment in anonymous function will not make your matlab assignment prints perfect. The print command is not implemented in Matlab yet. But the command shown here should be run in the notebook so that you can view your matlab assignment in Matlab notebook.
The complete procedure for printing your assignment in Matlab is shown below. The first step is to visit the folder named ‘Working Directory’ and then click on the matlab assignment link. You will find the code running in the folder.
The second step is to open up a new workbook in Matlab. Note that the code should not be loaded onto the workbook. Instead, it should be accessed from the link that Visit Website has been provided in the Working Directory. Load the workbook and open up the cell A1. Thereafter, type the code into cell A2.
The third step is to modify the code for your matlab assignment in anonymous function. Again, you need to visit the Working Directory to access the code. At the top of the page, double click on the ‘Workbook’ link. Then select the cell that corresponds to the code for your assignment. Use the arrow keys to enter the code. If the assignment is already written, simply type the code and press the Enter key.
The fourth step is to open up the file that corresponds to the Matlab Workbook. Navigate to the Matlab folder and open the file. You will see that there is a link for custom matlab assignments called’MATLAB assignments’.
Finally, save all the files. As before, type the code into the text box of the cell. Press the Enter key on the keyboard and wait for a second or so. The changes will be applied on the currently open matlab page. Close all the windows and the assignment are complete!