calculate PI without using pi function
There are many methods to get the pi(Ratio of circumference to diameter).
You should get pi without using the pi function in M...
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...
6年弱 前
解決済み
Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns.
E...
find radius of cone
if Slant height of Cone(I)& hight of Cone(H) given then find radius of the Cone(R)
for example I=5,h=4 then the ans R=3;
6年弱 前
解決済み
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...
6年弱 前
解決済み
multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y.
Examples:
Input x = 2
Output y is ...
kmph to mps
convert kilometer per hour to meter per second
6年弱 前
解決済み
Help the Patriots get to the Super Bowl
Given a football by the Patriots, return it to them with 2 psi less air in it.
(The original psi is passed as a number to the...
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:
...
6年弱 前
解決済み
Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...