当前位置: 首页 > 工具软件 > mom4j > 使用案例 >

mom代码 matlab,MOM RAKSA

乜璞瑜
2023-12-01

Solved

7 segment LED display

Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (see Wikipedia:

10 months ago

Solved

Too mean-spirited

Find the mean of each consecutive pair of numbers in the input row vector. For example,

x=[1 2 3] ----> y = [1.5 2.5]

x=[1...

10 months ago

Solved

Draw 'C'.

Given x as input, generate a x-by-x matrix 'C' using 0 and 1.

example:

x=4

ans=

[0 1 1 1

1 0 0 0

...

10 months ago

Solved

Draw 'F'

Draw a x-by-x matrix 'F' using 1 and 0. (x is odd and bigger than 4)

Example:

x=5

ans=

[1 1 1 1 1

1 0 0 0 0

...

10 months ago

Solved

Draw 'J'

Given n as input, generate a n-by-n matrix 'J' using 0 and 1 .

Example:

n=5

ans=

[0 0 0 0 1

0 0 0 0 1

0 0 ...

10 months ago

Solved

Draw a 'N'!

Given n as input, generate a n-by-n matrix 'N' using 0 and 1 .

Example:

n=5

ans=

[1 0 0 0 1

1 1 0 0 1

1 0 ...

10 months ago

Solved

Pizza!

Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.]

Non-scor...

10 months ago

Solved

Nearest Numbers

Given a row vector of numbers, find the indices of the two nearest numbers.

Examples:

[index1 index2] = nearestNumbers([2 5 3...

10 months ago

Solved

Given a 4x4 matrix, swap the two middle columns

If

a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4];

then the result is

ans =

1 3 2 4

1 3 2...

10 months ago

Solved

Determine whether a vector is monotonically increasing

Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

10 months ago

Solved

Select every other element of a vector

Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

10 months ago

Solved

Find the sum of all the numbers of the input vector

Find the sum of all the numbers of the input vector x.

Examples:

Input x = [1 2 3 5]

Output y is 11

Input x ...

10 months ago

Solved

Times 2 - START HERE

Try out this test problem first.

Given the variable x as your input, multiply it by two and put the result in y.

Examples:...

10 months ago

 类似资料: