解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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;

5年以上 前

解決済み


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年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


kmph to mps
convert kilometer per hour to meter per second

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


Matrix for beginners
Multiply x and y elemwise.

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

さらに読み込む