Resuelto


Complex number
For complex number c=a+bi, write code that will add a and b together.

más de 5 años hace

Resuelto


Find out next state (NS) of T Flip-Flop.
Find out next state (NS) of T Flip-Flop based on previous state (PS), inputs. Learn more about T Flip-Flop theory here: <htt...

más de 5 años hace

Resuelto


Indexed Probability Table
This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

más de 5 años hace

Resuelto


Easy problem
This is an easy problem. Just click on submit.

más de 5 años hace

Resuelto


X O X Oh!
_This follows on from problem 44850 - X O X O_ <https://www.mathworks.com/matlabcentral/cody/problems/44850-x-o-x-o> On a...

más de 5 años hace

Resuelto


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.

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


Elapsed time is -0.005204 seconds.
Write a function that takes less than zero seconds to execute, as measured using tic and toc. For repeatability, the test case p...

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

más de 5 años hace

Resuelto


Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0

más de 5 años hace

Resuelto


Signed Magnitude
For a given input vector, return the value that is furthest from zero. For example, if x = [1 2 -12] return -12.

más de 5 años hace

Resuelto


Dice roll - lateral faces
For this problem, you will be provided with the values of a dice roll (regular six-sided dice). The number of dice will be at le...

más de 5 años hace

Resuelto


Divisible by 5
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

más de 5 años hace

Resuelto


Tricky timing
Write a function that takes between 0.5 seconds and 0.6 seconds to run.

más de 5 años hace

Resuelto


Who is the smartest MATLAB programmer?
Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

más de 5 años hace

Resuelto


Penny flipping - calculate winning probability (easy)
Two players are playing a fair penny flipping game. For each flip, the winner adds one penny from the loser's collection to his/...

más de 5 años hace

Resuelto


Orthonormal matrix
You decide whether any given matrix is an orthonormal matrix or not. If each column in a matrix is perpendicular to the other...

más de 5 años hace

Resuelto


Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

más de 5 años hace

Resuelto


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

más de 5 años hace

Resuelto


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

más de 5 años hace

Resuelto


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

más de 5 años hace

Resuelto


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

más de 5 años hace

Resuelto


Sums with Excluded Digits
Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

más de 5 años hace

Resuelto


Pattern matching
Given a matrix, m-by-n, find all the rows that have the same "increase, decrease, or stay same" pattern going across the columns...

más de 5 años hace

Resuelto


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

más de 5 años hace

Resuelto


The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

más de 5 años hace

Cargar más