Solved


Energy of a photon
Given the frequency F of a photon in giga hertz. Find energy E of this photon in giga electron volts. Assume h, Planck's ...

7 years ago

Solved


Basic electricity in a dry situation
This is a very hypothetical situation between two individuals in a very dry atmosphere. He came running in rubber boots when...

7 years ago

Solved


Extra safe primes
Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...

7 years ago

Solved


Van Eck's Sequence's nth member
Return the Van Eck's Sequence's nth member. For detailed info : <http://oeis.org/A181391 OEIS link> and <https://www.theguard...

7 years ago

Solved


How to subtract?
* Imagine you need to subtract a few numbers using MATLAB. * You will not be using eval for this task. * Given two ASCII strin...

7 years ago

Solved


Function Iterator
Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

7 years ago

Answered
How to repeat a code and build upon previous run's results?
Try this. I hope I understand you right. CostsMtx=[16,18,17,20,17;25,27,29,32,28;1.5,1.6,1.7,2,1.8;50,54,56,60,57;60,63,65...

7 years ago | 0

| accepted

Question


Accuracy in Simulink in transient process calculation
Hi, I try calculate current in scheme (figure below). <</matlabcentral/answers/uploaded_files/77571/1.png>> There are s...

7 years ago | 1 answer | 0

1

answer

Answered
What is the best way to rotate a line from a central point?
Hi, try this: %y, x - line coordinates %a, b - point coordinates %phi - rotating angle in radians counterclockwise ...

7 years ago | 0

Solved


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

7 years ago

Solved


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

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

7 years ago

Solved


Find the peak 3n+1 sequence value
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

7 years ago

Solved


Clean the List of Names
Given a list of names in a cell array, remove any duplications that result from different capitalizations of the same string. So...

7 years ago

Solved


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

7 years ago

Solved


Mandelbrot Numbers
The <http://en.wikipedia.org/wiki/Mandelbrot_set Mandelbrot Set> is built around a simple iterative equation. z(1) = c z...

7 years ago

Solved


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

7 years ago

Solved


Make a Palindrome Number
Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...

7 years ago

Solved


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

7 years ago

Solved


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

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

7 years ago

Solved


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

7 years ago

Solved


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

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

7 years ago

Solved


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

7 years ago

Solved


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

7 years ago

Solved


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

7 years ago

Solved


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

7 years ago

Solved


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

7 years ago

Solved


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

7 years ago

Load more