Solved


Electric Flux
Calculate the flux passing through a surface. E is electric field, A is area.

5 years ago

Solved


Find square of given number
Find Square of any number

5 years ago

Solved


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

5 years ago

Solved


Calculate Resistance
Calculate Resistance R of a linear conductor having resistivity p, length l and area A

5 years ago

Solved


Calculate Resistance 2
In this problem, you have to calculate Resistance R of a linear conductor having voltage V across it and current I is passing i...

5 years ago

Solved


Square root of number
Square root of given number.

5 years ago

Solved


Add 3 numbers
In this problem, you have to add three numbers a, b and c. Give output d = add(a,b,c)

5 years ago

Solved


Given a matrix A (size m x n) create a matrix B which consists of matrix A sorted in descending order by columns and then by rows.
--------------- A= [ 2 6 -3 7 12 0 -12 5 1] --------------- B= [12 7 1 6 2 0 5 -3 ...

5 years ago

Solved


Given a Vector v1, create v2 which is the sum of each two adjacent elements in v1. {length(v2)=length(v1)-1}
if v1 is [1 2 3 4 5 6 7 8] then v2 should be [3 5 7 9 11 13 15]. if v1 is [1; 3; 5; 7] the...

5 years ago

Solved


Given a matrix A (size m x n) create a matrix B (size m+2 x n+2) which consists of matrix A surrounded by zeros. See Example below:
A = [1 2 3 4 5 6] ----------- B = [0 0 0 0 0 0 1 2 3 0 0 4 5 6 0 0 0 0 0 0]

5 years ago

Solved


Rearrange the given matrix to have all its zeros climb up to the top of each column - using for loops.
Given a matrix x, *using loops only* return a matrix y, in which all the zeros have "climbed" up to the top. That is, any zeros ...

5 years ago

Solved


Evaluate the zeta function for complex arguments
<https://www.mathworks.com/matlabcentral/cody/problems/45988 Cody Problem 45988> involved computing the Riemann zeta function fo...

5 years ago

Solved


Function minimization - global minimum
Sequel of problem 45951 <https://www.mathworks.com/matlabcentral/cody/problems/45951> Can you do even better, within the r...

5 years ago

Solved


Function minimization - beat fminsearch!
Sequel of problem 45948 <https://www.mathworks.com/matlabcentral/cody/problems/45948-function-minimization-beat-fminbnd> M...

5 years ago

Solved


Function minimization - beat fminbnd!
Matlab's fminbnd function finds a minimizer of a function within an interval. If often gets stuck in local minima. Can you do...

5 years ago

Solved


Estimate π from certain values of the zeta function
Cody Problems <https://www.mathworks.com/matlabcentral/cody/problems/2908-approximation-of-pi 2908> and <https://www.mathworks.c...

5 years ago

Solved


The Generalized-N Eggs Problem
A firm has invented a super-strong egg. For publicity purposes, it wants to determine the highest floor in a story building with...

5 years ago

Solved


The Google Interview: Two Eggs Problem
Consider the following problem, a popular Google interview question: A firm has invented a super-strong egg. For publicity pu...

5 years ago

Solved


Which integer is positive which is negative or which one is nothing ?
for example: our input number is 5 answer is 'POSITIVE' or our input is 0 answer is 'IT IS ZERO'

5 years ago

Solved


Magic
When I say yes 'no' when I say no 'yes'

5 years ago

Solved


The Dark Knight
The current position of the knight is x The desired destination is y The size of the chessboard is n. Find the minimu...

5 years ago

Solved


Find the point of intersection of tangents.
Given two points on a conic, find the point of intersection of the corresponding tangents. The conic is given in Cartesian co...

5 years ago

Solved


LMI Twins : Fuzzy Image matching
The image below from <http://logicmastersindia.com/2016/04P/ Logic Masters India Marathon 2016> is puzzle "Twins Co-Ordinates" w...

5 years ago

Solved


Convert base 10 to base x (2-16)
Convert input number(s) (double) in base 10 to base x (2 through 16). Output should be a cell of character arrays. Compute outpu...

5 years ago

Solved


Hello
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

5 years ago

Solved


Optimize the Tollbooths
Your company has recently built its own highway from which they hope to generate some revenue. The highway has no branches or in...

5 years ago

Solved


Find a Hamiltonian Cycle in a Graph
You are given a graph g and asked to find a Hamiltonian cycle of g. See <https://www.mathworks.com/help/matlab/ref/graph.html...

5 years ago

Solved


Restricted Subtraction v1
This problem is <https://www.mathworks.com/matlabcentral/cody/problems/45265-restricted-addition-v4 Restricted Addition v4> with...

5 years ago

Solved


Generate Golomb's sequence
Generate Golomb's sequence up to the given number. If n=4, then seq = [1, 2, 2, 3, 3, 4, 4, 4] If n=6, then s...

5 years ago

Load more