If t is a vector how do you assign the following vector in M
If t is a vector, how do you assign the following vector in Matlab. Vector P is formed based on element by element operation. P= (t^2- squareroot 5)/sin(t) >> P = t^2- squareroot (5)/Sin(t) >> P = (t^2- squareroot (5))/sin(t) >> P= (t.^2- squareroot (5)) ./sin(t) Write a MATLAB statement to generate the variable Z. Here x is a VECTOR. Avoid redundant operators. (x) = 4x^3cos (2x^5-5x) >> = 4* x * 0.3 .* cos(2* x*0. 5 - 5* x) >> = 4* x^3 .* cos(2* x.^5 - 5* x) >> = 4* x.^3 .* cos(2* x.^5 - 5* x) >> =4.* x^3 .* cos(2.* x^5 - 5.* x) How do we create a new directory called \"Projects\" inside the current directory? >> make projects >> mkdir Projects >> make Projects >> pwd Projects How do you list all the folders and files inside the current directory in Matiab? >> what >> Is >> dir >> Both b and c are correct
Solution
Note the concept
. / --> means pointwise division --> used for vectors
/ --> Simple division --> used for scalar
A = [1 2 3; 3 2 1]
B = A. ^2
Pointwise operator is used in case we have vector, matrix etc.
Question 5:
T is vector so answer will be
P= (t. ^2-sqrt (5)). /sint(t)
Question 6:
4 is scaler so we need 4*
X is vector so x. ^3
So answer will
4*x. ^3.*cos (2*x. ^5-5*x)
Question 7:
>> mkdir Projects is correct option
mkdir – this is make directory command
Question 8:
dir /ls command àLists all files in current directory.
what command àLists all MATLAB files in the current directory.
So both b and c
