Solved


struct2values()
Convert a struct object into a column vector. You can assume that the struct elements are scalars Example: a = struct();...

7 years ago

Solved


Return elapsed time
Write a function that returns the amount of time it takes to run the function, as measured by tic and toc. Your answer must be c...

7 years ago

Solved


speed vs size
The given string describes some MATLAB expressions such as 'pause(1)'. Compute its performance score = code size + run time in m...

7 years ago

Solved


Just another norm problem (JANP)
*Task:* Implement a function that takes a square matrix A and returns a nonzero vector yc which minimizes ...

7 years ago

Solved


Simple Robotics 1: On track?
As a small extension to problem: <http://www.mathworks.com/matlabcentral/cody/problems/2100-distance-to-a-straight-line-2d-give...

7 years ago

Solved


How many ways to write a number
Given two positive numbers n and k, where n>=k. In how many ways can we write n as sum of k positive numbers. Same numbers but d...

7 years ago

Solved


Breaking Bad Tiles (Spelling with Element Symbols)
Given a word, how you would spell it with element symbols from the periodic table? For instance, if given the string "Paper", yo...

7 years ago

Solved


Efficiency of a single phase Transformer
Calculate the efficiency of a single phase transformer whose KVA rating is A KVA, loading factor x,power factor p,full load copp...

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

7 years ago

Solved


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

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

7 years ago

Solved


Hamming Weight - Fast
The Hamming Weight, <http://en.wikipedia.org/wiki/Hamming_weight wiki Hamming Weight>, in its most simple form is the number of ...

7 years ago

Solved


Rumis Scorer 4
This problem is very similar to <https://www.mathworks.com/matlabcentral/cody/problems/3101-rumis-scorer-3 Rumis Scorer 3>. The ...

7 years ago

Solved


Graph Algorithms 3: Number of Connected Components
Given an adjacency matrix of a simple undirected graph, find the number of connected components.

7 years ago

Solved


Solve the picross! (Easy)
Solve the picross! <http://en.wikipedia.org/wiki/Nonogram> The arguments (horz and vert) are cells containing the clues, e...

7 years ago

Solved


Ratio between sum of primer numbers and non-prime numbers
Write a function that calculates the ratio between the sum of the prime numbers lower or equal than x, and the sum of the non-pr...

7 years ago

Solved


Sum of a geometric series
Give the sum of the first 'n' terms of a geometric series, given 'a' as the first term and 'r' as the ratio.

7 years ago

Solved


Get the value 100
Knowing that 123-45-67+89=100, write a function that gives this result for any order of the digits in the input. Otherwise, the ...

7 years ago

Solved


Skyscrapers - Puzzle
The Skyscraper puzzle challenge comes from <http://logicmastersindia.com/home/ Logic Masters India> and <http://www.conceptispuz...

7 years ago

Solved


Check if is a square
Given four coordinates, write a function to check if they form a square on the XY plane.

7 years ago

Solved


Arrange the names in alphabetical order (1)
Arrange the list of names in alphabetical order. The _original_ 'alphabetical order', that is: from α and β all the way throug...

7 years ago

Solved


Arrange the names in alphabetical order (2)
Arrange the list of names in alphabetical order, following the German standard <https://de.wikipedia.org/wiki/Alphabetische_Sort...

7 years ago

Solved


Add all the numbers between two limits (inclusive)
In this problem you must add up "all of the numbers" between two specified limits, |a| and |b|, in which |a| ≤ |b|. However, th...

7 years ago

Solved


Make a KITT-scanner on the command line
Did you know that you can actually remove characters from the command-line window? Just send a 'backspace' character to the outp...

7 years ago

Solved


Multivariate polynomials - sort monomials
In <https://www.mathworks.com/matlabcentral/cody/problems/44260-multidimensional-polynomials-convert-monomial-form-to-array Prob...

7 years ago

Solved


Mimic foldl in functional programming
Mimic the higher-order function |foldl| ( <http://en.wikipedia.org/wiki/Fold_%28higher-order_function%29 Wikipedia:Fold (higher-...

7 years ago

Solved


Response of First Order Control Systems
In practice, the input signal to an automatic control system is not known ahead of time but usually random in nature. Thus, in t...

7 years ago

Solved


Anyone for tennis? Your chances of winning a tie-break game
Imagine you are playing tennis and the score has reached 'six games all' in a Tie-break Set, so therefore the next game shall be...

7 years ago

Solved


You are constantly moving at a speed v faster than your twin brother. How long does it take before you become 1s younger than him according to the theory of relativity?
You are moving at a speed of v_in (km/h) relative to your twin brother of the exact (even in seconds) same age. Define: gam ...

7 years ago

Solved


Cosine frequency doubler
Given an input vector containing a cosine wave of unknown frequency, produce an output vector of the same length containing a co...

7 years ago

Load more