Find maximum value of a curve
Two vectors shall be already defined:
- Input vector x (e.g. x = 0:1:10)
- Result vector y (e.g. y = sin(x))
Create a n...
3年以上 前
解決済み
The proportion of NaN in the data
If NaN occupies less than half of the input data, return 1,
otherwise return 0.
eg.
input x = [1 2 NaN ; 4 NaN 6] >>> out...
Area-01
Given the radius of the circle inscribed in a square, find the area that is not bounded by the circle but inside the square.
...
3年以上 前
解決済み
Replicate elements in vectors (★★★)
(copy of Prob 867)
Replicate each element of a row vector (with NaN) a constant number of times. Examples
n=2, A=[1 2...
3年以上 前
解決済み
How many apples
You have x apples I take from you y apples now how many apples you have ?
3年以上 前
解決済み
Repeat The Components of Matrix
Repeat The components of a matrix so that the size of the output matrix is double to input matrix and components are repeated ne...
Draw 'B'
Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4)
Example:
x=5
ans=
[1 1 1 1 0
1 0 0 0 1
...
3年以上 前
解決済み
Draw a fancy '7' in a zero matrix!
Given a x-by-x matrix filled with zeros (x is odd and > 3). Use 7s to draw a number 7 into it! Like this:
x = 5, y =
7 7 7 7 7...
3年以上 前
解決済み
Draw "T" inside a Zero Matrix
Given a x-by-x matrix filled with zeros (x> 2). Use 1 to draw a letter "T" into it! Like this:
x = 5, y =
1 1 1 1 1
0 0 1 0 0...
3年以上 前
解決済み
Draw 'S'
draw S using nxn matrix, where n is odd and greater than 4
S = [1 1 1 1 1
1 0 0 0 0
1 1 1 1 1
0 0 0 0 1
...
Draw "C" in a zero matrix
Given a x-by-x matrix filled with zeros (x> 4). Use 1 to draw a letter C into it! Like this:
x = 5, y =
1 1 1 1 1
1 0 0 0 1
...