Creating Variables

  • Create a variable called visual_intensity and make it equal to 92. Ensure that the assignment result is not shown on the screen.

Solution

  • Create a variable called simple_text and assign it value of “A simple text but in Matlab”.

Solution

Using and Displaying Variables

  • Create two variables called num_words and num_sentences and assign them values of 6 and 10, respectively. Compute a new variable long_paragraph as a multiple of num_words and num_sentences. Ensure that none of the variable assignments is outputted to the screen.

Solution

  • Display values of num_words and num_sentences on the screen.

Solution 1

Solution 2

  • Create two variables called probability_1 and probability_2 and assign them values of 0.1 and 0.01, respectively. Compute a new variable odds by dividing probability_1 by probability_2. Display odds on the screen by ensuring there is semicolon at the end of the line where you display that result.

Solution

  • List all the variables that were generated during current session. How many did you get?

Solution

  • Delete variable probability_1.

Solution

  • Delete all variable and check that there are none left in the memory.

Solution

  • Reading and Writing files Demo:read_writefile_demo.m
  • Reading and Writing files Practice:
    • Create a 3 x 6 matrix of random integers, each in the range from 50 to 100. Write this to a file called randfile.mat. Then, read the file just to make sure that it worked!
  • OldNewRecognition
  • SimpleImageMixingDemo.m
    • ImageMixingTutorial.m
  • AlphaImageDemo.m
    • AlphaImageTutorial.m
  • KbDemo.m
  • KbQueueDemo.m
  • MouseTraceDemo.m
  • ProceduralNoiseDemo.m
  • check error matlab file : practice2_class07.m