解決済み


Find the "ordinary" or Euclidean distance between A and Z
A, B and Z define three points in the 3D _Euclidean_ space of the form: A = [x1;y1;0]; B = [x2;y2;0]; Z = [x2;y2;z]; Find th...

約11年 前

解決済み


Volume and area of a sphere
Input(r) - radius Output([v,s]) - volume and area

約11年 前

解決済み


06 - Matrix Equations 2
Define the vectors _aVec_ and _bVec_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http://samle.dk/STTBDP/Assig...

約11年 前

解決済み


Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

約11年 前

解決済み


Create a function handle that reverses the input arguments of another function handle
Given a function that takes two input arguments and returns one output, create another function handle that performs the same op...

約11年 前

解決済み


select the primes of a vector
Find the prime numbers in a vector

約11年 前

解決済み


Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...

約11年 前

解決済み


Make an N-dimensional Multiplication Table
*INSTRUCTIONS* This is a multi-dimensional variant of the normal multiplication table used to teach elementary students multi...

約11年 前

解決済み


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

約11年 前

解決済み


Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

約11年 前

解決済み


Tricky timing
Write a function that takes between 0.5 seconds and 0.6 seconds to run.

約11年 前

解決済み


07 - Common functions and indexing 1
Define _cMat_: <<http://samle.dk/STTBDP/Assignment1_3c.png>> ( _cMat_ = 10x10 matrix where the numbers from 1 to 100 runs ...

約11年 前

解決済み


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

約11年 前

解決済み


peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%

約11年 前

解決済み


MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

約11年 前

解決済み


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

約11年 前

解決済み


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

約11年 前

解決済み


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

約11年 前

解決済み


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

約11年 前

解決済み


Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false

約11年 前

解決済み


Remove white space from the string
Remove the white spaces (trailing and leading) from the input variable

約11年 前

解決済み


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

約11年 前

解決済み


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

約11年 前

解決済み


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

約11年 前

解決済み


Determine if a Given Number is a Triangle Number
*Description:* Determine if the elements of an input array are triangle numbers and return the result as an array with the sa...

約11年 前

解決済み


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

約11年 前

解決済み


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

約11年 前

解決済み


Number of Circles in a Number
Given a number, return the number of closed 'circles' in the base 10 numerical representation. Note: the number 4 has no circ...

約11年 前

解決済み


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

約11年 前

解決済み


middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

約11年 前

さらに読み込む