Community Profile

photo

晴葵


Last seen: 3 dagar ago Active since 2022

test

Statistics

  • MATLAB Central Treasure Hunt Finisher
  • Leader
  • Solver

View badges

Content Feed

View by

Solved


MatCAT - Reconstruct X from Its X-rays
Consider a matrix x x = [ 1 2 0 0 5 0 3 0 8 ] If we sum x along the rows we get row_sums = [3 5 11] ...

6 månader ago

Solved


Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...

7 månader ago

Solved


Numbers spiral diagonals (Part 2)
Inspired by Project Euler n°28 and 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right ...

9 månader ago

Solved


Break it up! Break it up!
You have N pennies. Write a Matlab script that will reveal how many different ways you can break up those pennies. For example...

9 månader 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: ...

9 månader ago

Solved


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

9 månader 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 ...

ungefär ett år ago

Solved


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

ungefär ett år ago

Solved


Kaprekar Steps
6174 is the Kaprekar constant. All natural numbers less than 10,000 (except some with same digits) can be reduced to 6174 in the...

mer än ett år ago

Solved


Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not count...

mer än ett år ago

Solved


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

mer än ett år ago

Solved


It's race time again! Write a function that is at least twice as fast as the test suite call of repmat().
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. This must be done in l...

mer än ett år ago

Solved


Given two arrays, find the maximum overlap
Given two (integer) arrays s1 and s2, create a new array s3 which is as short as possible and contains both arrays. #1 s1 = [...

mer än ett år 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:...

mer än ett år ago