Resuelto


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

más de 8 años hace

Resuelto


Back to basics 25 - Valid variable names
Covering some basic topics I haven't seen elsewhere on Cody. Given a string, return true if it is a valid MATLAB variable nam...

más de 8 años hace

Resuelto


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

más de 8 años hace

Resuelto


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

más de 8 años hace

Resuelto


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

más de 8 años hace

Resuelto


Number of Circles in a Number
Given a number, return the number of closed 'circles' in the base 10 numerical representation. Note: the number 4 has no circ...

más de 8 años hace

Resuelto


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

más de 8 años hace

Resuelto


Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

más de 8 años hace

Resuelto


Spot the First Occurrence of 5
This problem series invites you to solve two simple problems related to the integer NUMBER FIVE, in order to celebrate <https://...

más de 8 años hace

Respondida
I need help with a question: I have a matrix of 100 rows and 4 columns and im suppose to take the average of each column without using the mean function. The output is suppose to be a 1 row by 4 column matrix but i just get a single answer.
If you can not use the MEAN function then you can use any other function! What if you use the SUM function in the following way!...

más de 8 años hace | 0

Respondida
Write a for loop that is equivalent to the command sum(A),whereA is a matrix.
When you need to make a sum using a for cycle, it is necessary to initialize an accumulator variable to zero. This will allow yo...

más de 8 años hace | 0

Resuelto


Find offset of given matrix element from first matrix element
Given matrix m and an element of that matrix, return the offset from its first element. e.g. m=[11 2 34; 40 51 6; 87 8 109] el...

más de 8 años hace

Resuelto


Calculate volume of box
Calculate the volume of box,hiven its sides

más de 8 años hace

Resuelto


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

más de 8 años hace

Resuelto


Negative Infinity
Round the given array a towards negative infinity.

más de 8 años hace

Resuelto


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

más de 8 años hace

Resuelto


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

más de 8 años hace

Resuelto


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

más de 8 años hace

Resuelto


Find last zero for each column
Given a numeric array of arbitrary size, return the row index of the last zero for each column. If a column contains all nonzero...

más de 8 años hace

Resuelto


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

más de 8 años hace

Resuelto


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

más de 8 años hace

Resuelto


intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

más de 8 años hace

Resuelto


"Low : High - Low : High - Turn around " -- Create a subindices vector
Let two vectors *lo* and *hi* be given. The job is to create a index vector like so idx = [lo(1):hi(1) lo(2):hi(2) ...]...

más de 8 años hace

Resuelto


middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

más de 8 años hace

Resuelto


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

más de 8 años hace

Resuelto


Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

más de 8 años hace

Resuelto


The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

más de 8 años hace

Resuelto


Is this is a Tic Tac Toe X Win?
For the game of <https://en.wikipedia.org/wiki/Tic-tac-toe Tic Tac Toe> we will be storing the state of the game in a matrix M. ...

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


Time Expansion
How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

más de 8 años hace

Cargar más