Solved


Weird Diagonal Matrix!!
Given an integer n, create a matrix whose diagonal elements will be square matrices of size 1 to n. For example: n=2 z = ...

4 years ago

Solved


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are arranged in a spiral, the prime numbers contained in it form a sur...

4 years ago

Answered
subs command is not working on differentiation in MATLAB
g = -9.81; I1=1;I2=1.5;l1=2;l2=1;rho1=1.1;rho2=0.4; syms theta1(t) theta2(t) theta1=0.02*t; theta2=0.3*t; vec_rho1 = [rho1*...

4 years ago | 1

Answered
In this code how can I put multiple values of "betasqr" for example 0.2, 0.4, 0,6 and subsequently multiple values of "sbar" for example 1/0.02, 1/0.04, 1/0.06 (contd in des)
Define dbar as follows, and run a for loop 9 times dbar = 0.2*(1:9) sbar = 0.1./dbar

4 years ago | 0

| accepted

Solved


Draw a Diamond shape in ones Matrix with '0' s
Input will be odd numbers.The task is to make a Diamond shape in a ones matrix with '0's where the matrix will be a square matri...

4 years ago

Problem


Leyland Primes
A Leyland Number is defined as a number of the form - x^y + y^x, or, x^y - y^x (x,y)>1 Given an array of numbers(>1), check...

4 years ago | 1 | 8 solvers

Solved


Concatenated Consecutive Prime

4 years ago

Solved


Find the smallest prime with n inside
Consider the sequence that begins 101, 113, 127, 131, 149, 151, 163,... Not only is every term prime, the th term is the smalles...

4 years ago

Solved


List the dopey numbers
If vile numbers have binary representations that end with an even number of zeros (even vile), then numbers with binary represe...

4 years ago

Solved


List the vile numbers
Evil numbers, the subject of Cody Problem 2733 have an even number of ones in their binary representations, whereas odious numbe...

4 years ago

Solved


Investigate the frequency of last digits of prime numbers
The last digit of a prime number greater than 5 can be 1, 3, 7, or 9. If the primes are distributed randomly, then these digits ...

4 years ago

Solved


Divisible by n, Truncated-number Divisors
Some divisors only require a few numbers at the end of the number in question to determine divisibility, no matter how long. Exa...

4 years ago

Answered
Complex matrix & vertex errors
The last row in your matrix contains 10 elements rather than 9.

4 years ago | 1

Solved


Easy Sequences 6: Coefficient sums of derivatives
Consider the polynomial function and its first-order derivative . The sums of the coefficients of P and P', are and , respecti...

4 years ago

Answered
i want to coding
y=ones(8760, 1); size(y) z=reshape(y,365,24); size(z)

4 years ago | 0

| accepted

Answered
For Loop in 3D Array
a = rand(3,3,4); for k=1:size(a,3) y=a(:,:,k); for i=1:size(y,1) for j=1:size(y,2) out(i,j,k)=(...

4 years ago | 2

| accepted

Solved


Solve an ODE: precocious pair’s porcine pursuit
In our previous encounters with Matilda and Labrun, the scintillating siblings collected candy wrappers, amused others with card...

4 years ago

Solved


Determine whether a player solved a Cody problem
Write a function to determine whether a player has solved the specified Cody problems. The problem numbers are specified as a ve...

4 years ago

Answered
Different number of elements
There's an error in defining c. It should be c = 0.2

4 years ago | 0

| accepted

Answered
Piecewise plotting with clipping
t = 0:0.001:10; y = cos(pi*t); y(y>0.5)=0.5; y(y<-0.5)=-0.5; plot(t,y) ylim([-1 1])

4 years ago | 1

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

Solved


Easy Sequences 3: Prime 44-number Squares
The positive integers 62 and 238 are related. Their squares (3844 and 56,644) both end in '44'. In fact, 62 and 238 are the 3rd ...

4 years ago

Solved


Matrix Transposition
Given a matrix and an index, perform matrix transposition as follows - Replace non-corner value of ith ring from outside, with...

4 years ago

Solved


Define an arithmetic sequence
Given three numbers n, a, and d, define an arithmetic sequence of n terms with a being the initial term of the sequence and d be...

4 years ago

Problem


Matrix Transposition
Given a matrix and an index, perform matrix transposition as follows - Replace non-corner value of ith ring from outside, with...

4 years ago | 0 | 15 solvers

Answered
replace RGB values with new values
rgb=[67,68,69;0,67,69;0,66,68;125,126,127;122,125,127;117,122,126;113,114,115;110,113,115;106,111,114] floor(abs(rgb-1)/64)

4 years ago | 2

| accepted

Solved


Sieve of Eratosthenes
Find the nth lucky prime number. <https://planetmath.org/luckyprime> can u find a way for large n?

4 years ago

Solved


lucky
check whether n is a lucky number <https://oeis.org/A000959>

4 years ago

Load more