Tutor profile: Amir R.
Write a Matlab script that flips a one-dimensional array. Use this as an example: A = [1,2,3] the answer should be B=[3,2,1]
close all clear clc A = [1,2,3]; % the target matrix that needs to be flipped B = A*[0, 0, 1; 0, 1, 0; 1, 0, 0]; % multiplication of a 1 by N array with a N by N anti-diagonal matrix % flips the 1 by N array.
Subject: Machine Learning
Can Machine Learning be applied in order to solve all sorts of problems? Yes, or No, explain your answer.
The short answer is Yes, but it is not recommended and is not beneficial to try it for all problems. In cases that there is a deterministic relation between inputs and outputs the conventional methods solve the problem faster. Machine Learning has advantages when the governing rule among data is not obvious and we can learn from experiment tasks and improve the performance of the machine and hence find the program and governing rules.
Subject: C++ Programming
Give a simple definition of Friends in C++?
Friends are functions in C++ that are declared with a "friend" keyword. A non-member function can access private and protected members of a class if it is declared as a friend of that class.
needs and Amir will reply soon.