已解决


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

6 years 前

已解决


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

6 years 前

已解决


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

6 years 前

已解决


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

6 years 前

已解决


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

6 years 前

已解决


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

6 years 前

已解决


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

6 years 前

已解决


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 years 前

已解决


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

6 years 前

已解决


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

6 years 前

已解决


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 years 前

已解决


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 years 前

已解决


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

6 years 前

已解决


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

6 years 前

已解决


kmph to mps
convert kilometer per hour to meter per second

6 years 前

已解决


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

6 years 前

已解决


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

6 years 前

已解决


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 years 前

已解决


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

6 years 前

已解决


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

6 years 前

已解决


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

6 years 前

已解决


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

6 years 前

已解决


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

6 years 前

已解决


Matrix for beginners
Multiply x and y elemwise.

6 years 前

已解决


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

6 years 前

已解决


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

6 years 前

已解决


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

6 years 前

已解决


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

6 years 前

已解决


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

6 years 前

已解决


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

6 years 前

加载更多