Gelöst


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

fast 6 Jahre vor

Gelöst


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

fast 6 Jahre vor

Gelöst


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

fast 6 Jahre vor

Gelöst


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

fast 6 Jahre vor

Gelöst


Calculate the number of elements in a matrix.
Calculate the number of elements in a matrix.

fast 6 Jahre vor

Gelöst


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...

fast 6 Jahre vor

Gelöst


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

fast 6 Jahre vor

Gelöst


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...

fast 6 Jahre vor

Gelöst


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...

fast 6 Jahre vor

Gelöst


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

fast 6 Jahre vor

Gelöst


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;

fast 6 Jahre vor

Gelöst


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...

fast 6 Jahre vor

Gelöst


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 ...

fast 6 Jahre vor

Gelöst


Determine the square root
Determine the square root of the value the user has entered, n.

fast 6 Jahre vor

Gelöst


kmph to mps
convert kilometer per hour to meter per second

fast 6 Jahre vor

Gelöst


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...

fast 6 Jahre vor

Gelöst


Matlab Basics II - Unit Conversion
Write a function that converts Kg to lbs, returns the answer to the nearest 1/100th of a pound

fast 6 Jahre vor

Gelöst


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: ...

fast 6 Jahre vor

Gelöst


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...

fast 6 Jahre vor

Gelöst


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

fast 6 Jahre vor

Gelöst


Simple Matrix
Make the following matrix without typing it in one by one. [1 2 3; 2 4 6; 4 8 12] x=[1 2 3].

fast 6 Jahre vor

Gelöst


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

fast 6 Jahre vor

Gelöst


Square
X is a number, write a code, where Y should be the square of X.

fast 6 Jahre vor

Gelöst


Matrix for beginners
Multiply x and y elemwise.

fast 6 Jahre vor

Gelöst


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

fast 6 Jahre vor

Gelöst


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

fast 6 Jahre vor

Gelöst


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

fast 6 Jahre vor

Gelöst


Square a Number
Given an input x, return y, which is equal to the square of x.

fast 6 Jahre vor

Gelöst


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

fast 6 Jahre vor

Gelöst


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

fast 6 Jahre vor

Mehr laden