Skip to main content

Posts

Showing posts with the label load

Rejecting the applications that are not fit using Matlab

Program Let us say that you have got a client who is a HR Manager of a company. Understand the situation below. The company has given a notification in a newspaper for an opening and around 10 people has turned up. The selection process was three stages out of which for two stages your client want you to sort out the applicants. In the first stage a question paper for 5 marks is given and in the second stage a question paper for 5 marks is given while third stage is interview. They store the marks of the candidates in a file which has the data which looks as follows: Id Number Paper 1 Paper 2 1 1.5317 4.6950 2 2.5425 4.3797 3 2.5539 2.7508 4 4.0881 3.1124 5 3.9742 2.9352 6 3.2216 1.0387 7 1.8930 1.5062 8 4.0579 2.3546 9 2.6641 1.1524 10 1.7536 4.2215 such that it h...

save append and read data from a file using Matlab

Problem Create a 4x4 random matrix and save it in a file. Now create a 4x4 matrix and append the new matrix to the file. Finally read the data from the file and display on the command window. Solution In this program we will create a matix using the rand function and then save it to the file. Again we will create a matrix and append the matrix to the file. Finally we will read the data from the file. In this program we will only use the command prompt window to accomplish the task. First of all head on to the program section to get insight into what is happening, then you can refer to the explanation section to get detailed explanation of the program section. Some of the concepts used to solve this post are as follows: 1) Matrices in Matlab 2) rand function in Matlab 3) Save in Matlab 4) Append in Matlab 5) Load in matlab 6) variables in matlab 7) matrix In Mathematics Program >> mat = rand ( 4 , 4 ) mat = 0.7094 0.6551 0.9597 0.7513 ...