Matlab Basics II - Log and natural log
Write a function that calculates the difference between the log and natural log of a vector, to two decimal places
example:
...
1年以上 前
解決済み
ZigZag matrix with reflected format
ZigZag MATRIX with REFLECTED format.
We have only input x. We have to create a matrix in the following pattern.
input n=5...
construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x.
E...
1年以上 前
解決済み
Cody Matlab Version
What is the current Cody Matlab Release?
*Output:* string
*Examples:*
'(R2012a)' or 'R2012a'
Hint: We have mo...
1年以上 前
解決済み
Special matrix
Make a square matrix with this shape. For n=4
M =
1 1 0 0
1 0 1 0
0 1 0 ...
Display negative numbers
Given array,x, display all the negative numbers and display output as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].
1年以上 前
解決済み
Energy of an object
Calculate the total mechanical energy of an object.
Total Energy= Potential energy + Kinetic energy
P.E.=m*g*h
K.E.=1/2...
1年以上 前
解決済み
Convert a vector into numbers
Suppose a vector x = [ 1 2 4 7] is given. You have to convert this vector into string number y = '1247'.
Examples
x = [ 1...
1年以上 前
解決済み
Are you in XY plane?
Take a point P as an input position Vector (x,y,z). If you are in XY plane, return 1 as an output otherwise return 0.
Example...
1年以上 前
解決済み
Multiply Column
Given two input, one matrix and one scalar number
For example
A is a matrix given
A = [ 1 2 2 5 2 5
2 3 4 6...
1年以上 前
解決済み
Reshape a Vector
Write a function that accept three inputs. The first one is a row vector S. The
second and third arguments are m and n which de...
1年以上 前
解決済み
imaginary results
Return the value of the imaginary number i to the power of input argument n.
1年以上 前
解決済み
Golden ratio
Calculate the golden ratio. Hint: phi^2 = phi + 1.