Community Profile

photo

Chunru


Last seen: Today

DSO National Laboratories

446 total contributions since 2013

Matlab user since 1990

Contact

Chunru's Badges

  • MATLAB Central Treasure Hunt Finisher
  • Revival Level 1
  • Knowledgeable Level 3
  • First Answer
  • Number Manipulation I Master
  • Indexing I Master
  • Commenter
  • Sequences And Series II Master
  • Speed Demon
  • Creator
  • Sequences And Series I Master
  • Cody Challenge Master
  • Introduction to MATLAB Master
  • CUP Challenge Master
  • Strings I Master

View all

Contributions in
View by

Solved


Word Distance - Sum
Let's suppose that the distance of a word can be calculated by summing the differences between its letters, having assigned the ...

10 hours ago

Solved


Split bread like the Pharaohs - Egyptian fractions and greedy algorithm
How would you split 5 loaves of bread among 8 people in all fairness? Get a hint from the Pharaohs. 5/8 = 4/8 + 1/8 , i.e. each ...

10 hours ago

Solved


Additive persistence
Inspired by Problem 2008 created by Ziko. In mathematics, the persistence of a number is the *number of times* one must apply...

11 hours ago

Solved


Converting numbers back from extended form
Thanks for all the help you guys gave me on writing out the numbers in extended form in <http://www.mathworks.com/matlabcentral/...

11 hours ago

Solved


Numbers in extended form
Shhhhhhh. Don't tell my daddy, but I'm borrowing his Cody account so all of you very smart people can help me out. I just star...

11 hours ago

Solved


Ripping numbers apart!
So you have to "rip" a number apart into individual digits... The end output is a cell. That is if: x = 12345678 o...

12 hours ago

Solved


Decode a simplified barcode
Given a bar code from this <http://www.mathworks.com/matlabcentral/cody/problems/602-make-a-simplified-bar-code exercise>: Re...

12 hours ago

Solved


Make a simplified barcode
Given an integer to encode, make a barcode using the following encoding scheme: * The bar code is made from the binary versio...

12 hours ago

Solved


Reverse Calculator
Use this reverse calculator and give correct output Its simple, In my Reverse calculator if you press 0 it will be considered...

12 hours ago

Solved


Sums of Multiple Pairs of Triangular Numbers
This is a follow-up to <https://www.mathworks.com/matlabcentral/cody/problems/44289 Problem 44289> - Find two triangular numbers...

12 hours 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 coun...

13 hours ago

Solved


Make roundn function
Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

14 hours ago

Solved


Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

14 hours ago

Solved


Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

14 hours ago

Solved


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

14 hours ago

Solved


Check that number is whole number
Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. <http://en.wikipedia.org/wiki/Whole...

14 hours ago

Solved


MATLAB Basic: rounding IV
Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

14 hours ago

Solved


MATLAB Basic: rounding III
Do rounding towards minus infinity. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 8

14 hours ago

Solved


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

14 hours ago

Answered
Matlab less than comparison
The correct way should be: cA(i+1,:) = max(cA(i+1,:), NC); or idx = cA(i+1,:) <NC; cA(i+1, idx)=NC;

20 hours ago | 0

Answered
How to get 2d slices from a 3D image.
From 'doc slice': [X,Y,Z] = meshgrid(-2:.2:2); V = X.*exp(-X.^2-Y.^2-Z.^2); % replace this with your 3D data xslice = [-...

21 hours ago | 0

Solved


7 segment LED display
Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (see Wikipedia: <http://...

21 hours ago

Solved


Convert Roman to Arabic Numerals
Based upon what I see on tv and at the movies, the use of Roman numerals indicates something is important or sophisticated (e.g....

21 hours ago

Solved


Math with Roman Numerals
Given a function R within (+,-,*,/) and two Roman numerals a & b, compute aRb in Roman numerals.

22 hours ago

Solved


Test if a Number is a Palindrome without using any String Operations
*Description* Given an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits ...

22 hours ago

Solved


Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

22 hours ago

Solved


Must be in the front row...
You are given a matrix followed by a single number. Your object is to write a script that will shift the matrix around so that ...

22 hours ago

Answered
how to calculate PSNR value of two color images?
Try the following: doc psnr

1 day ago | 0

Answered
Could anyone help me how to change the values of the matrix to a desired range.
Something like this: N = 10 X = zeros(N); X(1:2,:) = 1; X(3:4, 3:end)=2; X(5:6, 5:end)=3; X(7, 7:end)=5; X(8, 9:end)=6; ...

1 day ago | 0

Solved


Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

2 days ago

Load more