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

más de 3 años ago

Solved

Pernicious Anniversary Problem

Since Cody is 5 years old, it's pernicious. <http://rosettacode.org/wiki/Pernicious_numbers Pernicious number> is an integer whi...

más de 3 años ago

Solved

Pentagonal Numbers

Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...

más de 3 años ago

Solved

Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.

Submit your answer to this problem a multiple of 5 seconds after the hour. Your answer is irrelevant; the only thing that matte...

más de 3 años 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...

más de 3 años ago

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

más de 3 años 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...

más de 3 años ago

Solved

Breaking Out of the Matrix

Do you want to take the Red Pill, or the Blue Pill? If you take the Blue Pill, you will simply pass along to the next problem...

más de 3 años ago

Answered

plots working on matlab 2013b but not on 2016b

The plot system was change in 2014b and some function are not compatible. You need to review all your plots and update it. re...

plots working on matlab 2013b but not on 2016b

The plot system was change in 2014b and some function are not compatible. You need to review all your plots and update it. re...

alrededor de 4 años ago | 0

Question

How I can find the directory the script or function running now is

I am running a script and i want to know the path it is with out using the script name. The path is in 'matlabpath' so by usi...

alrededor de 4 años ago | 1 answer | 0

Question

Compile a file in windows to run on MAC os or UBUNTO

I am using MATLAB Compiler to create a program in my PC (win 8). It create a .exe file that i can run on another windows PC. ...

alrededor de 4 años ago | 1 answer | 0

Solved

Rotate and display numbered tile

Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

más de 4 años 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...

más de 4 años ago

Solved

Scoring for oriented dominoes

Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

más de 4 años ago

Solved

Determine if a Given Number is a Triangle Number

*Description:* Determine if the elements of an input array are triangle numbers and return the result as an array with the sa...

más de 4 años ago

Solved

Elapsed Time

Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

más de 4 años ago

Solved

Making change

Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

más de 4 años ago

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

más de 4 años 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 =...

más de 4 años ago

Solved

Make one big string out of two smaller strings

If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

más de 4 años ago

Solved

Sorted highest to lowest?

Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

más de 4 años 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...

más de 4 años ago

Answered

How can i make program for method of iteration ...please help me out .. equation is X^3-2x=1

you need to find a function of X from your equation for your example X^3-2X=1 you get X(X^2-2)=1 and then X=1/(X^2-2) so ...

How can i make program for method of iteration ...please help me out .. equation is X^3-2x=1

you need to find a function of X from your equation for your example X^3-2X=1 you get X(X^2-2)=1 and then X=1/(X^2-2) so ...

más de 4 años ago | 0

| accepted

Solved

Spot the outlier

All points except for one lie on a line. Which one is the outlier? Example: You are given a list of x-y pairs in a column ...

alrededor de 5 años ago

Solved

Make a run-length companion vector

Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...

alrededor de 5 años ago

Solved

Flag largest magnitude swings as they occur

You have a phenomenon that produces strictly positive or negative results. delta = [1 -3 4 2 -1 6 -2 -7]; Marching thr...

alrededor de 5 años 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 ...

alrededor de 5 años ago

Solved

Is my wife right? Now with even more wrong husband

Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

alrededor de 5 años 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 ...

alrededor de 5 años ago