Solved


Multiply binary numbers
Write a function to multiply two binary numbers input as strings. For example, input values of ‘1011’ and ‘101’ should give ’110...

2 days ago

Solved


Combination logic
Create an algorithm in MATLAB that calculate the combination for the given positive integers n and k as inputs. When k > n, the ...

4 days ago

Solved


Easy Sequences 10: Sum of Cumsums of Fibonacci Sequence
The function F(n) is defined as the set of Fibonacci numbers from the first up to the n-th. S(n) is the result of applying to F,...

4 days ago

Solved


Count the primes in Collatz sequences
Several Cody problems (21, 69, 42937, 44448, 44784, 52422) involve Collatz sequences. These start with a seed . If is odd, the ...

5 days ago

Solved


The perimeter of a circle
Calculate the perimeter of a circle E.g If input r(radius) = 2 , the output( the perimeter of a circle) = 12.5664.

5 days ago

Solved


Easy Sequences 17: Mu Variant Function
The mobius function is an important arithmetic function. It is often represented by the Greek letter mu (μ), and is sometimes ca...

5 days ago

Solved


Free points!
Products of all elements in x. eg. x = [1 2 3 4 5]; y = 120;

6 days ago

Solved


Easy Sequences 16: Volume of Embedded Octahedron
An octahedron (not regular) is formed by joining the centers of the faces of a rectangular parallelepiped (see below figure). ...

6 days ago

Answered
Random number selection from matrix column and from decimal number
[A(randi(3,1,4)+[0 3 6 9]),rand(1,2)];

7 days ago | 0

Answered
How to store array?
x=0:.1:3; for k=1:length(x) A=[5*x(k),0;2*x(k)^2,1] B=[0;2.55] Y(:,k)=A\B; end

7 days ago | 1

Answered
How to fill a matrix with formula
y=reshape(y,5,[])';

8 days ago | 1

| accepted

Solved


Easy Sequences 15: Pythagorean Area with maximum Hypotenuse
A pythagorean triangle is defined as a right triangle with all three sides having integer lengths. Examples of pythogorean trian...

9 days ago

Answered
Create table of means from multiple tables
temp=T1.Properties.VariableNames; T=array2table((T1{:,:}+T2{:,:}+T3{:,:})/3); T.Properties.VariableNames=temp;

10 days ago | 0

Solved


List the Moran numbers
The quotient of a Moran number and its digit sum is prime. For example, 117 and 481 are Moran numbers because 117/(1+1+7) is 13 ...

10 days ago

Solved


Easy Sequences 14: Consecutive Composites
Generating a given number of consecutive numbers all of which are composites is easy. For example the following is a sequence of...

11 days ago

Solved


Easy Sequences 13: Average Speed of Spaceship
A certain alien spaceship is capable of traveling at extremely high velocities and is able to change speed instantaneously. The ...

11 days ago

Solved


List modest numbers up to n
After determining the nude numbers, or the numbers that openly display some of their divisors as their digits, one would think t...

11 days ago

Solved


Determine whether a number is unprimeable
The number 204 is unprimeable because no single digit can be changed to make it prime. In contrast, the number 207 is not unprim...

11 days ago

Solved


Determine whether a number is a fibodiv number
The number 14 is a fibodiv number because you can divide it into 1 and 4, use those numbers as the seeds for a Fibonacci sequenc...

11 days ago

Solved


Easy Sequences 12: 50th Prime
Write a function that outputs the 50th prime after a given number. For example, the 50th prime after 500 is 829. NOTE: If 'n' i...

22 days ago

Solved


Easy Sequences 7: Easy as Composite Pi
The prime Pi function is defined as the number of prime numbers from 1 to a certain given limit. In MATLAB, it is easy to create...

30 days ago

Answered
Printing out zeros as empty character for a tex file
s=sprintf([num2str(i) ' & ' num2str(myData(i,1), format)... ' & ' num2str(myData(i,2), format) ... ' & ' nu...

1 month ago | 0

| accepted

Solved


Shuffle
Shuffle a vector by breaking it up to segments of |n| elements, and rearranging them in a reversed order. For example, the ve...

1 month ago

Answered
Change error bar colour and data point colour in a loop
errorbar(x(i),y(i),err(i),'o', 'LineWidth', 2, 'MarkerFaceColor','g','Color','g');

1 month ago | 1

| accepted

Answered
How do I randomly extract 20 segments of data from a signal?
You could just keep matrix form with a 3rd dimension for k=1:20 newMatrix(:,:,k)=yourMatrix(randperm(60001,1000),:); end

1 month ago | 0

Solved


Cos Function
x is the abscissa. find the absolute value of cosine of -x and the same value with changed sign.

1 month ago

Answered
Plotting the function of single variable
n0 = 400; r0 = 1/n0; gamma = 1.26; p=20;%assumed s=.7;%assumed P=1:(p+1); r=r0*gamma.^(0:p); N=@(t)r0*n0*(2*s/(2*s-1))^(p...

1 month ago | 0

Solved


Retirement savings
At the start of what year will you have reached or exceeded a savings goal? Parameters (all are constant scalars given in a s...

1 month ago

Solved


Easy Sequences 2: Trigonometric function with integral input and output
The function 'F', defined as: , will always return an integer if the input is a natural number (in radian...

1 month ago

Solved


pick up 2 number!
create number A with 5 digits,number 1 is appear 2 times,other is 1 times. How many way to pick up n number randomly from 1 to ...

1 month ago

Load more