Resuelto


For a given linear index as input for n sized square matrix, find corresponding row and column.
If input is 1, the row and column will be 1 and 1 respectively.

más de 10 años hace

Resuelto


Get all corner elements from a matrix where dimension of matrix is always equal to or greater than 2.
if a given matrix a = [1 2 3;4 5 6]; so answer is going to be [1 3;4 6]

más de 10 años hace

Pregunta


Eval with multiple lines
I have to run following with eval function in a single line. a = 1:20; % first step is to define a variable b = '[nan a(...

más de 10 años hace | 1 respuesta | 0

1

respuesta

Problema


longest sequence of nans
In an array return the length of longest sequence of nans for each column. x = [ 2 3 1 2 5 6; nan nan 5 n...

más de 10 años hace | 1 | 73 solvers

Problema


unique with nan
input x = [2 NaN 3 5 NaN; 1 NaN 4 9 NaN; 8 -2 7 6 -2; 7 4 8 5 4]; output y_correct = [2 ...

más de 10 años hace | 2 | 43 solvers

Problema


replace nan values iteratively.
replace nan values with the average of two neighbour non-nan value iteratively as follow; x = [2; 4; 6; nan; nan; nan; 10]; ...

más de 10 años hace | 2 | 32 solvers

Resuelto


Cumulative difference
Given an array, return the cumulative difference. Example a = [ 1 3 5 7 ] cumdiff = [ 1 2 1 -2 ]

más de 10 años hace

Resuelto


Matrix FUN
Given a Matrix M, find out the number of elements of matrix that are divisible by 3. M = [1 2 3;4 5 6;7 8 9]; ou...

más de 10 años hace

Resuelto


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

más de 10 años hace

Resuelto


Generate the sum of Squares of the given number
|P(n) = 1^2 + 2^2 + ... + n^2| |P(1) = 1| |P(2) = 1 + 4 = 5;| |P(3) = 5 + 9 = 14;| |P(4) = 14 + 16 = 30;|

más de 10 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 10 años hace

Resuelto


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

más de 10 años hace

Resuelto


the number of inputs
Find the number of the inputs of the function. example y = theinputnumber(x,k); function called theinputnumber has 2 in...

más de 10 años hace

Resuelto


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

casi 11 años hace

Resuelto


Place numbers
Given two input first input is a matrix which consist of the index numbers of the second input vector. You place the second inpu...

casi 11 años hace

Resuelto


MATLAB Basic: rounding IV
Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

casi 11 años hace

Resuelto


MATLAB Basic: rounding III
Do rounding towards minus infinity. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 8

casi 11 años hace

Resuelto


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

casi 11 años hace

Resuelto


MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

casi 11 años hace

Resuelto


Back to Basics - Find no. of elements in a matrix?
Let A be a m*n matrix. Find the total no. of elements in A ? (Hint - formula based) A = [1 2 3;4 5 6]; output = 6

casi 11 años hace

Resuelto


Minimum of each diagonal
The well-known <http://www.mathworks.com/help/matlab/ref/min.html min> function can operate along either the rows or the columns...

casi 11 años hace

Resuelto


Maximum of each diagonal
The well-known <http://www.mathworks.com/help/matlab/ref/max.html max> function can operate along either the rows or the columns...

casi 11 años hace

Resuelto


Factorial: Unlimited Size : java.math
This challenge is an application of java.math that allows unlimited precision calculations. The primary reference sites are <ht...

casi 11 años hace

Resuelto


Generate this matrix
For a given odd integer n, generate a matrix as follows: Input: n = 5; Output: [ 2 1 0 0 0 1 ...

casi 11 años hace

Resuelto


Check transmitted data follow even parity (True or false)
Check transmitted data follow even parity (True or false) <http://en.wikipedia.org/wiki/Parity_bit/ Parity Bit> Say, '010...

casi 11 años hace

Resuelto


RMS value from a set of observations
Find rms value of a set of observations of a physical quantity? Hint: The observations are accessed in the form of vectors

casi 11 años hace

Resuelto


arrangement of symbols
There are n different symbols in which m symbols are identical (m<n). How many different arrangement can we make with these symb...

casi 11 años hace

Resuelto


Lychrel Number Test (Inspired by Project Euler Problem 55)
The task for this problem is to create a function that takes a number _n_ and tests if it might be a Lychrel number. This is, re...

casi 11 años hace

Resuelto


Accumulate Cells
Given a combining function, a cell array, and an initial value, accumulate the result. For example, accumcell(@plus,{1,...

casi 11 años hace

Resuelto


Interior angles
Find the sum of interior angles for polygon of x sides.

casi 11 años hace

Cargar más