IN MATLAB
Write a script that will prompt the user for strings and read them in, store them in a cell array (in a loop), and then print them out.
% MATLAB program to read string input from user - for loop
x = input('Enter n: ');
for i=1:x
user_string = input('Enter string: ','s');
all_strings{i} = user_string;
end
for i=1:length(all_strings)
fprintf("%s ", all_strings{i});
end

Note: For queries, drop me a comment.
IN MATLAB Write a script that will prompt the user for strings and read them in,...
Write a script in MATLAB that prompts the user to do a, b, & c. a.)script that prompts the user to enter the day of the week using the input function. If the information the user enters is equal to “Saturday” or “Sunday”, display “have a nice weekend” in the Command Window. Otherwise, display “Good luck in your class lectures and your studies.” b.)script that prompts the user to input the following array by providing an example in the prompt:...
Write a Matlab script that asks the user for two angles in degrees and stores them as variables. Calculate and store the cosines of the numbers (they must be converted to radians to use Matlab's cos function). Use a conditional statement and fprintf to print the larger of the two cosine values and the angle (in degrees) that resulted in that value. If they are equal, print a message to the effect that the cosines of the two angles (print...
MATLAB script 1) Prompt the user for their first name 2) Prompt the user for their last name 3) Prompt the user for their age Display a sentence that greets the user using their first and last name, and congratulates them for what will be their age on their next birthday. Example: Hello John Smith. Congratulations on turning 45 on your next birthday!
Question 8 Data Structures - arrays, matrices and strings (a) Write a MATLAB script that will copy all of the negative values in a matrix,M, to a new vector, N.[7 marks] (b) Write a MATLAB script that reads in two strings from the user and comparesthem, printing’same’if they are the same or the indexes of the characterswhich differ if they are different. For example, if the user typed in ’car’and ’cat’, the script would print ’the words differ in characters:...
1) Write a MATLAB script to prompt a user to input two numbers, then assess whether the two numbers are equal or not. If the two numbers are equal, display that they are equal in the Command Window. If they are not equal, display that they are not equal in the Command Window. 2) Write a MATLAB script that prompts the user to enter the day of the week using the input function. If the information the user enters is...
Write a Java program that will create an array of Strings with 25 elements. Input Strings from the user and store them in the array until either the user enters “quit” or the array is full. HINT: the sentinel value is “quit” all lowercase. “Quit” or “QUIT” should not stop the loop. HINT: you have to use the equals method (not ==) when you are comparing two Strings. After the input is complete, print the Strings that the user entered...
In Matlab, write a script which asks a user to input numbers until the user inputs 0. Then the script should print only the positive numbers entered by the user, in reverse order. For example, if the user inputs “4,-1,5,2,-3,-8,0” the script should print “2,5,4”.
Write a program that has a loop to read in ten strings and put them into a list. Write a second loop to print the strings in the reverse order. This is an exercise in indexing, so do not use the reverse() method of list. (python 3)
For Python
| Instructions Write a script named difpy. This script should prompt the user for the names of two text files and compare the contents of the two files to see if they are the same. 1. If they are the script should simply output "Yes". 2. If they are not the script should output "No", followed by the first lines of each file that differ from each other The input loop should read and compare lines from each...
Write a Python script in that will prompt the user to enter a string. After the user enters their string print its length and the ordinal value of the first, third, and seventh character. Assume the input will be of sufficient length. Use "nice" input and output