logical operators: MATLAB
Using logical operators, write a code that finds the values for which the vector 𝑥 is in the range of 47 ≤ 𝑥 ≤ 67 Where the vector 𝑥 is: 𝑥 = [47, 54, 34, 23, 55, 67, 98, 97, 54]
Write a program that allows the user to input a certain number from 1 to 100. When the entered value is less than or equal to 50, have the program display the words “This value is less than or equal to 50”. If the value if greater than 50, have it display “This value is greater than 50”. Make sure to take into account the condition in which the entered number is not valid. If the number is not valid, have the program display some type of error message.
Write a program that uses the 𝑓𝑖𝑛𝑑() function in MATLAB to find the values inside the matrix 𝑋 that are greater than the value of six. Where the matrix 𝑋 is: 𝑋 = [ 5, 4, 7 10, 22, 4 20, 44, 1 ]
Write a program that takes in a city name as a string and displays the gas price in that city using a switch statement. Use the following table in your program: City Gas Price Los Angeles $2.45 San Diego $2.43 San Francisco $2.54