Community Profile

photo

Trần Nhật Tân


Last seen: ungefär en månad ago Active since 2021

Statistics

  • Tiles Challenge Master
  • Leader
  • Speed Demon
  • Creator
  • Commenter
  • Cody Problems in Japanese Master
  • CUP Challenge Master
  • Project Euler I
  • Introduction to MATLAB Master
  • Cody Challenge Master
  • Community Group Solver
  • Draw Letters

View badges

Content Feed

View by

Solved


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

ungefär en månad ago

Solved


07 - Common functions and indexing 6
Create a variable _m_ as a magic square with the size 6 x 6 Magic squares are defined as square matrices, where the sum of a...

ungefär en månad ago

Solved


Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

ungefär en månad ago

Solved


Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

ungefär en månad ago

Solved


Complex number
For complex number c=a+bi, write code that will add a and b together.

ungefär en månad ago

Solved


Reverse a matrix
Its simple. You have to reverse a given matrix.

ungefär en månad ago

Solved


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

ungefär en månad ago

Solved


Choose the best fitting dominoes
You will be given a cell array of nx2 matrices. Choose one row from each matrix. These are the ordered pairs that will be plac...

ungefär en månad ago

Solved


Stuff the Board
You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

ungefär en månad ago

Solved


Circular Primes (based on Project Euler, problem 35)
The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. The...

ungefär en månad ago

Solved


Mersenne Primes vs. All Primes
A Mersenne prime (M) is a prime number of the form M = 2^p - 1, where p is another prime number. <https://www.mathworks.com/matl...

ungefär en månad ago

Solved


Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

ungefär en månad ago

Solved


Largest Twin Primes
<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...

ungefär en månad ago

Solved


Find nearest prime number less than input number
Find nearest prime number less than input number. For example: if the input number is 125, then the nearest prime number whi...

ungefär en månad ago

Solved


Make a vector of prime numbers
Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...

ungefär en månad ago

Solved


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

ungefär en månad ago

Solved


Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

ungefär en månad ago

Solved


05 - Vector Equations 1
Define the vector _cVec_: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of -0....

ungefär en månad ago

Solved


Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

ungefär en månad ago

Solved


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

ungefär en månad ago

Solved


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

ungefär en månad ago

Solved


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

ungefär en månad ago

Solved


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

ungefär en månad ago

Solved


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

ungefär en månad ago

Solved


04 - Scalar Equations 3
Define the variables a, b, and c: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> <<http://samle.dk/STTBDP/Assignment1_4-b....

ungefär en månad ago

Solved


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

ungefär en månad ago

Solved


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

ungefär en månad ago

Solved


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

ungefär en månad ago

Solved


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

ungefär en månad ago

Solved


Back to basics 14 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of all MATLAB keywords

ungefär en månad ago

Load more