Community Profile

# James

### Naval Surface Warfare Ctr

3.043 total contributions since 2012

#### James's Badges

View all

Contributions in
View by

Solved

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 ...

5 maanden ago

Solved

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,....

5 maanden ago

Solved

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.

7 maanden ago

Solved

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...

8 maanden ago

Solved

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...

8 maanden ago

Solved

Datetime basics
Generate the datetime scalar representing the current date

8 maanden ago

Solved

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.

8 maanden ago

Solved

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

8 maanden ago

Solved

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

8 maanden ago

Solved

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...

8 maanden ago

Solved

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 ...

8 maanden ago

Solved

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 ...

8 maanden ago

Solved

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]

8 maanden ago

Solved

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 ...

8 maanden ago

Solved

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...

9 maanden ago

Solved

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...

9 maanden ago

Solved

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

10 maanden ago

Solved

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...

ongeveer een jaar ago

Solved

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...

ongeveer een jaar ago

Solved

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...

ongeveer een jaar ago

Solved

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...

ongeveer een jaar ago

Solved

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...

ongeveer een jaar ago

Solved

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...

ongeveer een jaar ago

Solved

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...

ongeveer een jaar ago

Solved

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

ongeveer een jaar ago

Solved

(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...

ongeveer een jaar ago

Solved

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...

ongeveer een jaar ago

Solved

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...

ongeveer een jaar ago

Solved

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...

ongeveer een jaar ago

Problem

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...

ongeveer een jaar ago | 0

Load more