Community Profile

photo

Minh Tan Trinh


Last seen: 5 mesi ago Active since 2021

Statistics

  • Cody Problems in Japanese Master
  • Promoter
  • Tiles Challenge Master
  • Project Euler I
  • Cody Challenge Master
  • Draw Letters
  • Introduction to MATLAB Master
  • CUP Challenge Master
  • Community Group Solver
  • Solver

View badges

Content Feed

View by

Solved


Fix the last element of a cell array
Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...

circa un anno ago

Solved


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

circa un anno ago

Solved


Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

circa un anno ago

Solved


Remove element(s) from cell array
You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....

circa un anno ago

Solved


Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

circa un anno ago

Solved


Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

circa un anno ago

Solved


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

circa un anno ago

Solved


Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

circa un anno ago

Solved


Natural numbers in string form
Create a cell array of strings containing the first n natural numbers. _Slightly_ harder than it seems like it should be. Ex...

circa un anno ago

Solved


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

circa un anno ago

Solved


There are 10 types of people in the world
Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...

circa un anno ago

Solved


Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

circa un anno ago

Solved


Relative ratio of "1" in binary number
Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

circa un anno ago

Solved


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

circa un anno ago

Solved


Given an unsigned integer x, find the largest y by rearranging the bits in x
Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

circa un anno ago

Solved


Find out sum and carry of Binary adder
Find out sum and carry of a binary adder if previous carry is given with two bits (x and y) for addition. Examples Previo...

circa un anno ago

Solved


Convert given decimal number to binary number.
Convert given decimal number to binary number. Example x=10, then answer must be 1010.

circa un anno ago

Solved


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

circa un anno ago

Solved


Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...

circa un anno ago

Solved


Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

circa un anno ago

Solved


サイコロを作ろう
1から6までの独立かつランダムな数値を返すような関数を作成しましょう。 例: >> [x1,x2] = rollDice(); と入力すると x1 = 5 x2 = 2 のような解を返します。

circa un anno ago

Solved


チェッカーボードを作ろう
整数 n が与えられた時、以下の様な1と0を含むn×nの行列を作成しましょう。a(1,1) は1にする必要があります。 例: 入力 n = 5 出力 a が [1 0 1 0 1 0 1 0 1 0 ...

circa un anno ago

Solved


ベクトルの値が増加しているかを調べよう
ベクトルの値が増加している場合 (ベクトルの各要素が前の要素よりも大きい場合) には true を、そうでない場合には false を返すようなコードを書いてみましょう。 例: 入力が x = [-3 0 7] のとき、 関数の...

circa un anno ago

Solved


二乗になっている数を見つけよう
ある数のベクトルが与えられた場合、そのベクトルの要素の一つが他の要素の二乗であれば true を返し、それ以外の場合は false を返すようなコードを書いてみましょう。 例: 入力が a = [2 3 4] のとき、 出力 b は t...

circa un anno ago

Solved


二つのベクトルの要素ごとの積の平均を計算しよう
二つの同じ長さのベクトルが与えられたとき、二つのベクトルの要素ごとの積の平均を求めましょう。 例: 二つのベクトル [1 2 3] と [10 15 20] が与えられたとき、 それぞれの要素ごとの積の平均を取ると、 解は 33.33...

circa un anno ago

Solved


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

circa un anno ago

Solved


行列内の素数の平均をとろう
行列が与えられたときに、その行列内の素数の平均を計算する関数を作成しましょう。 例: 入力の行列が in = [ 8 3            5 9 ] のとき、 出力が 4 あるいは (3+5)/2 のようになり...

circa un anno ago

Solved


ゼロでない要素が一番多い行を探そう
行列 a が与えられたとき、行列 a の中で一番ゼロの要素が少ない行のインデクス r を返す関数を作成しましょう。このとき、行列 a には一つだけしかこの条件に当てはまる行がないと仮定します。 例: 入力として、行列 a = [ 1 ...

circa un anno ago

Solved


特定の値がベクトル内に含まれているかを確認するコードを書こう
ベクトル b にあるスカラ値 a が含まれていれば出力として 1 を返し、含まれていなければ 0 を返すような関数を作成しましょう。 例: a = 3; b = [1,2,4]; スカラ値 3 はベクトル b に含まれていない...

circa un anno ago

Solved


NaN (欠損値) が含まれている行を削除しよう
行列 A が与えられたとき、その行列の中に NaN (Not a number; 欠損値) の要素がある行を見つけ出し、その行を削除しましょう。 例: A = [ 1 5 8 -3 NaN 14 ...

circa un anno ago

Load more