Solved


Right shift an array n times with constant space.
Right shift an array n times with constant space, that is, no extra array can be used. Right shift operation: Last element com...

5 years ago

Solved


Function - Cylinder Surface Area
The goal

5 years ago

Solved


SatCom #6: Inclination of a Sun-Synchronous Orbit
*Satellite and Space Engineering - Problem #5* _This is part of a series of problems looking at topics in satellite and space...

5 years ago

Solved


Calculate Engine Power
Calculate Engine Power (P) in kW given the values of Torque(M) in Nm and Engine Speed(n) in rpm

5 years ago

Solved


Compute the missing quantity among P, V, T for an ideal gas
Consider 100 mol of helium gas at a certain pressure (P), volume (V), and temperature (T). Assuming that the ideal gas law appli...

5 years ago

Solved


Electrical Diode Current Calculation
In engineering, there is not always a single equation that describes a phenomenon accurately enough to be applied in all instanc...

5 years ago

Answered
conditional representation of logical numbers
a='111110011111000000011000011111'; a=strrep(a,'1001','111'); a=strrep(a,'101','111'); a=strrep(a,'010','000'); a=strrep(a,'...

5 years ago | 0

| accepted

Solved


Most Frequent Word - 01
Given a document file or a character array, find out the most frequent word in that document. In the case of multiple words -...

5 years ago

Solved


List the good primes

5 years ago

Solved


Find the smallest integer m such that n divides m!
Write a function that takes an integer and finds the smallest integer whose factorial is divisible by . For example, if , then...

5 years ago

Solved


Goldbach's marginal conjecture - Write integer as sum of three primes
Goldbach's strong conjecture states that every even integer greater than 2 can be expressed as the sum of two primes. For exampl...

5 years ago

Solved


Twins in a Window
<http://en.wikipedia.org/wiki/Twin_primes Twin primes> are prime numbers that differ by 2, such as [11,13] or [41,43]. Write a f...

5 years ago

Answered
How to solve an inequality
f=@(x)15*x-15+0.41*(sqrt(1/60516+1/123*(15*x-2.9))-1/246)^2*3000-2.9; g=@(x)1/60516+1/123*(15*x-2.9); x=[fzero(g,.2),fzero(f,....

5 years ago | 0

| accepted

Answered
Sort columns to get the lowest possible difference in every row
A for-loop can go through 200,000 cycles quite fast. Not sure there is an easiler way. a=A(:,1); b=A(:,2); tol=3; for k=1:si...

5 years ago | 0

Solved


Find similar sequences
Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum. Given a matrix ...

5 years ago

Solved


arithmetic progression
I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...

5 years ago

Solved


Largest Geometric Series
Extension of Ned Gulley's wonderful <http://www.mathworks.com/matlabcentral/cody/problems/317 Problem 317>. In a geometric se...

5 years ago

Solved


geometric progression
I've modified my <http://uk.mathworks.com/matlabcentral/cody/problems/2800-arithmetic-progression previous program> so that it n...

5 years ago

Solved


Damping of Servomotors with Tachometer Feedback
In Control Engineering, servomotors with tachometer feedback can be modeled by the second order system K / [J*s^2 + (B + K*K...

5 years ago

Answered
Generate random binary matrix (Matlab)
Brute force might work for you. Obviously, some combinations of N,M,n,m will not work. N=10;M=5;%matrix size n=6;%number of on...

5 years ago | 0

| accepted

Answered
3D matrix with equation
Should be something like this if I understood you correctly. [m,n]=size(Y); N=zeros(n); for j=1:n for l=1:n N(j,l)...

5 years ago | 0

Answered
Any one can help me on this?
x=[1;1];%initial guess for k=1:10%you did not specify how many iterations or a tolerance f=[4*x(1)^2+x(1)*x(2)+4*x(2)^2-12;...

5 years ago | 0

Solved


ASCII Birthday Cake
Given an age and a name, give draw an ASCII birthday cake. For example, given the name "CODY" and the age 5, return a string wit...

5 years ago

Solved


The glass half full
Identical glasses are placed in a triangular tower structure, such that the top level (L = 1) comprises one glass, the next leve...

5 years ago

Solved


Calculate the average value of the elements in the array
Calculate the average value of the elements in the array

5 years ago

Solved


Find the number of days in a given year
Given a year number (eg. 2000) as input, find how many days are there in the given year.

5 years ago

Solved


GJam 2013 Veterans: Ocean View (Small)
This Challenge is derived from <http://code.google.com/codejam/contest/2334486/dashboard#s=p2 GJam 2013 Veterans Ocean View>. Th...

5 years ago

Answered
Generate list of random permutations by column
for k=1:50 p(:,k)=randperm(32)'; end

5 years ago | 0

Solved


Key Generation for Solitaire Cipher
The Solitaire Cipher by Bruce Schneier was introduced to Cody in two problems by Doug Hull: http://www.mathworks.com/matlabcent...

5 years ago

Answered
readmatrix in a loop
for l=1:5 A{l}=readmatrix(['File_' num2str(l) '.txt']);%not sure if all your data is the same size end

5 years ago | 0

| accepted

Load more