Resuelto


Best Problem Elections
When I am writing those words, there are 2002 problems on Cody. Many of them are simply wonderful. Do you remember which of them...

más de 9 años hace

Resuelto


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

más de 9 años hace

Resuelto


Calculate inverse matrix in square matrix
A=eye(3) Calculate inverse matrix of given input. B=function(A) ans = 1 0 0 0 1 0 ...

más de 9 años hace

Resuelto


Cell Source Index
Suppose that C is a cell array whose elements consist of row vectors of elements of the same type. For example, C could be a ce...

más de 9 años hace

Resuelto


Log of a number
Write a script that will give the log of x as output.

más de 9 años hace

Respondida
If I select an element in a matrix, say MAT(2,2), how to find how many elements of the same value of MAT(2,2) in the matrix are "connected" to it.
You need bwconncomp <https://it.mathworks.com/help/images/ref/bwconncomp.html> For example: Mat=[1 2 3 4 2;2 2 2 2 0;...

más de 9 años hace | 2

Respondida
how to change or compliment a particular bit in the binary string?
Here it is a=50; b=dec2bin(a) pos = 4; b(pos) = char(97-double(b(pos)))

más de 9 años hace | 1

Respondida
string to number conversion with mixed values
str1 = 'index_N=10' str2 = 'index_M=5' sub1 = str1(7:end) sub2 = str(7:end)

más de 9 años hace | 0

Respondida
How do i adjust the spacing between the slices of my stacked images?
First, most probably you don't want to stack them in the 4-th dimension as you wrote rgb4D = cat(4, IA, IB, IC, ID); Bec...

más de 9 años hace | 0

Resuelto


Adding each element
Add the each element of the matrix.

más de 9 años hace

Resuelto


What is Title of Cody Challenge 42?
Given a Cody Challenge number return its Title. *Input:* Cody Challenge Number *Output:* Title of the Cody Challenge ...

más de 9 años hace

Resuelto


Deriving a function using the difference quotient
Write a function that evaluates the derivative of a function in a given point using the well-know formula of the difference quot...

más de 9 años hace

Resuelto


Create an m x n array consisting only of an input value.
Create an array with m rows and n columns wherein all entries are assigned the input value x.

más de 9 años hace

Resuelto


Find files with extension ext in the current directory
List all files with extension 'ext' in the current directory. Return a char matrix with the name of files in rows. Return 0 if...

más de 9 años hace

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 9 años hace

Resuelto


Airline Ticket Mod7 Checksum
There are 13 digits in an airline ticket number. If an airline ticket number is valid, the 13th digit should be the remainder of...

más de 9 años hace

Resuelto


Corresponding letter to ASCII code.
Given the letter, the output will show the corresponding ASCII code.

más de 9 años hace

Resuelto


matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix [ 1 2 3 ; 4 5 6 ; 7 8 9 ] the resulting 1-...

más de 9 años hace

Resuelto


"Power matrix" of two vectors
Given two row vectors x,y of lengths m and n (respectively), create an m x n matrix whose i,j entry is x(i)^y(j).

más de 9 años hace

Resuelto


Permutations of input vector
Find and output all permutations of given vector

más de 9 años hace

Resuelto


Which way to go?
Given an m*n grid, How many ways are there to go from upper left corner to the lower right one? You can only move right...

más de 9 años hace

Resuelto


Sum my indices
Given inputs M and N (in that order), output an MxN matrix whose entries are equal to the sum of their indices. Example input...

más de 9 años hace

Resuelto


Convert number from given base to other base
Convert number from given base to other base. Example 400 in base 5, find equivalent number in base 8, it is 144.

más de 9 años hace

Resuelto


Combination logic
Create an algorithm in MATLAB that calculate the combination for the given positive integers n and k as inputs. When k > n, the ...

más de 9 años hace

Resuelto


Increase monotonically
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

más de 9 años hace

Resuelto


Step up
For given input array, output a array with all elements step up by two

más de 9 años hace

Resuelto


most frequent character
Obtain most frequent character Let s='balaram'; output='a';

más de 9 años hace

Resuelto


Soccer - TOTO
How many different outcomes are there in a soccer-TOTO with n games? For each game there are three results: win - loss - equa...

más de 9 años hace

Resuelto


Cofactor
Given a matrix, find the cofactor of the element in 'i'th row and 'j'th column.

más de 9 años hace

Resuelto


Repeat The Components of Matrix
Repeat The components of a matrix so that the size of the output matrix is double to input matrix and components are repeated ne...

más de 9 años hace

Cargar más