解決済み


Create a vector of n alternating ones and zeros (★★)
Given n, your output should be a vector y of numbers such that the first number is 1 and the numbers following it alternate betw...

1年以上 前

解決済み


Vector creation using linspace
Create a vector y containing n uniformly spaced values between a and b, with a < b. Use linspace.

1年以上 前

解決済み


Triangle Numbers (★★)
(copy of problem 5) Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3...

1年以上 前

解決済み


Generate n equally spaced "intervals" between -x and x (★)
Given n and x, return a list of numbers (in ascending order) that divides the interval [-x x] into n equal-length intervals. ...

1年以上 前

解決済み


Vector creation using colon operator
Create a vector y containing n uniformly spaced values between a and b, with a < b. Use the colon (:) operator.

1年以上 前

解決済み


Create a vector of the first n odd numbers (★)
If n = 10, your program should return a vector y, where y = [1 3 5 7 9 11 13 15 17 19].

1年以上 前

解決済み


Sum of terms in a series 2 (★★★)

1年以上 前

解決済み


Average of corner elements of a matrix (★★)
(copy of prob 2235) Calculate the average of corner elements of a matrix. e.g. x=[1 2 3; 4 5 6; 7 8 9;] avg = (1+3+7+9)...

1年以上 前

解決済み


Select every other element of a vector (★★)
(copy of prob 6) Write a function which returns every other element of the vector passed in. That is, it returns the all odd-...

1年以上 前

解決済み


Median computation (★)
Given a vector of values, compute the median. The median is defined as the middle value in a set of *sorted* data. Thus, if ...

1年以上 前

解決済み


Remove the row average (★★★)
(copy of Prob. 963) Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solut...

1年以上 前

解決済み


Vector raised to a power, element-wise (★)
Given a vector A and a number x, raise each element of the vector to the power of x. Thus, if A = [2 5 7 1] and x = 0.5, then ...

1年以上 前

解決済み


Swap the first and last columns (★★)
(copy of Prob 19) Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becom...

1年以上 前

解決済み


Sum of elements in a vector (★)
(copy of Prob. 3) Find the sum of all the numbers of the input vector x. Input x = [1 2 3 5] Output y is 11 <> ...

1年以上 前

解決済み


Make a checkerboard matrix (★★★★★)
(copy of Prob. 4) Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1...

1年以上 前

解決済み


Energy of a photon
&#9883 &#9762 &#9883 &#9762 &#9883 &#9762 &#9883 Given the frequency F of a photon in giga hertz. Find energy E of this photon...

1年以上 前

解決済み


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

1年以上 前

解決済み


vector to string
Determine what the ASCII characters spell out. Example: input = [ 72 73 71 72] output = 'HIGH'

1年以上 前

解決済み


Remove All elements less than 5
Given an input vector x, remove all elements of x less than 5 . Example: Input x = [ 1 2 5 7 3 ] Output y is [ 5 7 ...

1年以上 前

解決済み


Sum of integers numbers
Sum of the numbers from 1 to 100

1年以上 前

解決済み


calculate the tangent of angle in radians
Calculate the tangent of angle in degrees

1年以上 前

解決済み


Calculate the base-10 logarithm of a number
Calculate the logarithm of number x

1年以上 前

解決済み


Determine if a row vector has NaN
Determine if a row vector x has NaN

1年以上 前

解決済み


Vector with a repeated entry
Create a row vector of length n, filled with 4's. For example, if n = 3, output = [4 4 4]

1年以上 前

解決済み


ASCII code of a leter.
Given the letter, the output will show the corresponding ASCII code.

1年以上 前

解決済み


If you have matrix A, create matrix B using matrix A as an "element"
A = [1 2 3 4; 5 6 7 8] B = [1 2 3 4 1 2 3 4; 5 6 ...

1年以上 前

解決済み


Corresponding ASCII code.
Given the number, the output will show the corresponding ASCII code.

1年以上 前

解決済み


Log of a number
Write a script that will give the log of x as output.

1年以上 前

解決済み


Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

1年以上 前

さらに読み込む