Area of a pentagon
Given the side of a regular pentagon and its apothem return the area of pentagon.
Remember the area of pentagon is calculate ...
5 years ago
Solved
Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times.
Examples
n=2, A=[1 2 3] -> [1 1 2 2 3 3]
...
5 years ago
Solved
Percentage
There is x liter water and y gram => z is percentage of salt in water
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:
...
5 years ago
Solved
Roots of quadratic equation
Given a quadratic equation ax^2 + bx + c = 0, write a function to return its roots.
5 years ago
Solved
Create sequnce 1 4 9 16 25.........
Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input
Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice.
Ex...
5 years ago
Solved
Beginner's Problem - Squaring
Try out this test problem first.
Given the variable x as your input, square it by two and put the result in y.
Examples:
...