Community Profile

# James

### Naval Surface Warfare Ctr

3,043 2012 年以降の合計貢献数

#### James's バッジ

すべて表示

Find the complement of a number in binary
Input x is a decimal number and output y is the complement of binary representation of x. For example, x = 10 has the binary ...

2ヶ月 前

Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

2ヶ月 前

Simple spirometer - find your lung capacity from the number and size of soap bubbles in one breath
Assumed that each bubble has practically the same diameter d. Given total number n of bubbles. Find volume v of breath.

5ヶ月 前

Minimum possible M of the maximum side of a triangle of given area A.
Suppose a triangle has area A. Suppose it has three sides S1, S2, and S3. Suppose M = max([S1 S2 S3]). What is the minimum po...

5ヶ月 前

Probability of red tulips
I hope to give you bulbs of tulip. But I do not know the color of those petals. I just know that the color is red, white or yell...

5ヶ月 前

Datetime basics
Generate the datetime scalar representing the current date

5ヶ月 前

Calculate the square of a number (Super Easy)
The goal is to calculate the square (y) of a number (x). Good way to start MatLab for beginners.

5ヶ月 前

Easy problem
This is an easy problem. Just click on submit.

5ヶ月 前

In this problem, you have to add three numbers a, b and c. Give output d = add(a,b,c)

5ヶ月 前

String Array Basics, Part 3: Convert Cell Array with Missing Values to String Array
<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

5ヶ月 前

Rearrange the given matrix to have all its zeros climb up to the top of each column - using for loops.
Given a matrix x, *using loops only* return a matrix y, in which all the zeros have "climbed" up to the top. That is, any zeros ...

5ヶ月 前

Given a matrix A return a vector of the product of the elements in each column using a loop without using prod.
--------------------- for m: 3 1 3 3 10 1 9 1 9 4 1 4 5 6 5 ...

5ヶ月 前

Given a matrix A (size m x n) create a matrix B (size m+2 x n+2) which consists of matrix A surrounded by zeros. See Example below:
A = [1 2 3 4 5 6] ----------- B = [0 0 0 0 0 0 1 2 3 0 0 4 5 6 0 0 0 0 0 0]

5ヶ月 前

Given a matrix A (size m x n) create a matrix B which consists of matrix A sorted in descending order by columns and then by rows.
--------------- A= [ 2 6 -3 7 12 0 -12 5 1] --------------- B= [12 7 1 6 2 0 5 -3 ...

5ヶ月 前

Given a Vector v1, create v2 which is the sum of each two adjacent elements in v1. {length(v2)=length(v1)-1}
if v1 is [1 2 3 4 5 6 7 8] then v2 should be [3 5 7 9 11 13 15]. if v1 is [1; 3; 5; 7] the...

6ヶ月 前

Unique: Faster for options 'rows' and 'stable' for large array of uint8
Challenge: Execute unique(a,'rows','stable') Faster for 'a' being uint8. The "unique" function for the 'rows' and 'stable' o...

7ヶ月 前

Create tangent function out of cosine only
Please don't use tangent and sine functions

7ヶ月 前

Relative points in 2D: problem 1
The 2D pose of a robot, with respect to a world coordinate frame {O}, is described by a 3x3 homogenous transform matrix T. A la...

10ヶ月 前

Relative pose in 2D: problem 2
We consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north. There is a...

10ヶ月 前

Relative points in 2D: problem 2
The 2D pose of a robot, with respect to a world coordinate frame {O}, is described by a 3x3 homogenous transform matrix T. A la...

10ヶ月 前

Relative pose in 2D: problem 1
We consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north. There is a...

10ヶ月 前

USC Fall 2012 ACM : Chemical Analysis
This Challenge is to solve Question D, Chemical Analysis, of the <http://contest.usc.edu/index.php/Fall12/Home USC ACM Fall 2012...

10ヶ月 前

Repeat Vector Values an Arbitrary Number of Times
Given two vectors of the same size, repeat the values of the first vector the number of times given in a second vector. For exam...

10ヶ月 前

4 Digit Sequence Repetitions
Given a 4 digit integer, a sequence can be created such that the next digit in the sequence is the ones digit from the sum of th...

10ヶ月 前

Negative without '-'
Simple: return a negative number without using the '-' sign. Thanks to Problem <https://www.mathworks.com/matlabcentral/cody/...

10ヶ月 前

(Linear) Recurrence Equations - Generalised Fibonacci-like sequences
This problem is inspired by problems <http://uk.mathworks.com/matlabcentral/cody/problems/2187-generalized-fibonacci 2187>, <htt...

10ヶ月 前

How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

10ヶ月 前

Solve equation numerically
y'=y In order to solve equation using computer, numerical analysis are needed. 1st order Euler's method is one of the metho...

11ヶ月 前

Iccanobif numbers 1
There are a lot of problems in Cody that deal with Fibonacci numbers (1, 1, 2, 3, 5, 8, 13, 21 etc...) so let's turn things arou...

11ヶ月 前

Iccanobif numbers 1
There are a lot of problems in Cody that deal with Fibonacci numbers (1, 1, 2, 3, 5, 8, 13, 21 etc...) so let's turn things arou...

11ヶ月 前 | 0