Guest User

Untitled

a guest
Jul 23rd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. 3.1
  2. Question 1
  3. Help gives detailed information about the funtion written after it, with additional sourcss for information.
  4. helpwin lists topics for groups of functions.
  5. doc displays online documentation in the Help browser inside matlab.
  6.  
  7. Question 2
  8. ver gives detailed version description with package names and directories
  9. version version gives version number only
  10.  
  11.  
  12. 3.2
  13. Question 1
  14. ans is used to display the answer of the most recent answer, and is variable created automatically when you specify no output argument
  15.  
  16. Question 2
  17. semicolons are used to separate rows in an array creation command, or to suppress the output display of a line of code.
  18.  
  19. Question 3
  20. yes, variables are case sensetive.
  21.  
  22. Question 4
  23. These are functions, not variables.
  24. It's possible to overwrite them, and they will turn into variables.
  25. to undo it, you need to use the clear function.
  26.  
  27. Question 5
  28. the semi colon in this function seperates rows in the array (matrix)
  29.  
  30. Question 6
  31. A = [0:3.14/4:3.14]
  32.  
  33. Question 7
  34. A=[1:3 ; 4:6 ; 7:9]
  35.  
  36. Question 8
  37. rand(M,N) uniformly distributed random numbers and arrays in an m-by-n matrix of random entries
  38. randn(M,N) Normally distributes random numbers and arrays in an m-by-n matrix of random entries
  39.  
  40. Question 9
  41. returns the sizes of each dimension of an array in a vector.
  42.  
  43. Question 10
  44. displays value of variable
  45.  
  46. Question 11
  47. because X is 4x2, Y is 3x4
  48.  
  49. Question 12
  50. puts elements on the main diagonal only
  51.  
  52. Question 13
  53. sums diagonal elements
  54.  
  55. Question 14
  56. a = sum(diag(A));
  57.  
  58. Question 15
  59. displays cell array contents
  60.  
  61. Question 16
  62. indicates nonexecutable text within the body of a program
  63.  
  64. Question 17
  65. Curly braces encase the answer in a cell
  66.  
  67. Question 18
  68. gets names of fields
  69.  
  70. Question 19
  71. determines whether input is a structured array
  72.  
  73. Question 20
  74. rmfield
  75.  
  76. 3.3
  77. Question 1
  78. The %{ and %} symbols enclose a block of comments that extend beyond one line
  79. % is a one line comment
  80.  
  81. Question 2
  82. the gamma increased
  83.  
  84. Question 3
  85. The picture gets brighter
  86.  
  87. Question 4
  88. cellmode has functions that allow you to break your scripts into smaller chunks that can be run individually
  89.  
  90. Question 5
  91. help is created by inserting comments at the beginning of your program. If your program includes a function, type the help text below the function definition line
  92.  
  93. Question 6
  94. Elapsed time is 0.043596 seconds.
  95. Elapsed time is 0.0402439 seconds.
  96. 0.003 faster?
  97.  
  98. Question 7
  99. .^ is element-wise power
  100. ^ is matrix power
  101.  
  102. Question 8
  103. Elapsed time is 0.00017786 seconds.
  104. Much faster
  105.  
  106. Question 9
  107. i=0;
  108. t=0;
  109. while t < 3.14*2
  110. t = t+3.14/4;
  111. i=i+1
  112. x(i) =sin(t)
  113. end
Advertisement
Add Comment
Please, Sign In to add comment