Question
code please
Short Answer B: Given the variable array, write a line that determines if it is the empty array Show an example of how you would display a triangle in MATLAB. The triangle structure variable is name tri and contains three points. Draw the triangle in red with a line size of 5. Convert the following code into a while loop: count = 0;for (index = 100: -2: 0) count = count + index;end use the variables name (example value: Mike), balance (example value 211.351), and account number (example value: 149701) to display output with this format: 'Susan has $100.99 in their account #149723.' Make sure to put a new line at the end of the output. Do not hard code any values use the variables. Notice the balance amount displayed has exactly 2 decimals. create a new variable and give it the value which results from applying DeMorgan's Law to: (use appropriate MATLAB syntax) continue = times_ up approximately = true AND (x 100)
Explanation / Answer
Ans:
(a) isempty(array) returns logical 1 (true) if array is an empty array and logical 0 (false) if array is not an empty array.
(b)
Create the shape inserter object and read the image file from it.
Define the vertices which will form a triangle: [a1 b1 a2 b2 a3 b3].
Draw the triangles and display the result.
(c) count = 0;
index = 100;
while(index >= -2)
{
count = count + index;
index += 0;
}