문제를 풀었습니다


Values in Array
How many values are in the array

4개월 전

문제를 풀었습니다


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

4개월 전

문제를 풀었습니다


Replace values under a limit
For a vector x and number n, the goal is to find every element of x inferior to n and replace it by n. Example x= [ 1 2 3...

4개월 전

문제를 풀었습니다


Find Out sum of principal diagonal element of given matrix
Find out sum of principal diagonal element of given matrix If A=[1 0 0; 0 1 0;0 0 1], then answer must be 3.

4개월 전

문제를 풀었습니다


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...

4개월 전

문제를 풀었습니다


calculate linear convolution two vectors
for e.g in: a = [1 2 3] b = [4 5 6] out: y = [4 13 28 27 18]

4개월 전

문제를 풀었습니다


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

4개월 전

문제를 풀었습니다


Negative Infinity
Round the given array a towards negative infinity.

4개월 전

문제를 풀었습니다


Positive Infinity
Round the array a towards positive infinity

4개월 전

문제를 풀었습니다


Energy of an object
Calculate the total mechanical energy of an object. Total Energy= Potential energy + Kinetic energy P.E.=m*g*h K.E.=1/2...

4개월 전

문제를 풀었습니다


Linear Motion 1
An object travels N feet in the first second of travel, N feet again during the second second of travel and N feet again during ...

4개월 전

문제를 풀었습니다


Geometric series
Find the sum, given the first term t1, the common ratio r, and number of terms n. Examples If input t1=1, r=1, n=7 the...

4개월 전

문제를 풀었습니다


Back to basics 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix and row and column, output the index of th...

4개월 전

문제를 풀었습니다


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


How many Integers?
Count the integers in a given vector |v|. You *must* use a loop to count each element separately. Examples: Input: v...

4개월 전

문제를 풀었습니다


An array is given that contains the marks. Find out the highest 3 marks
An array is given that contains the marks received by a group of students in their class test. Find out the highest 3 marks rec...

4개월 전

문제를 풀었습니다


Element by element multiplication of two vectors
Given two input vectors, return the element-by-element product. Example A = [1 2 3] B = [7 3 1] The answer should be...

4개월 전

문제를 풀었습니다


Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector for example x ...

4개월 전

문제를 풀었습니다


Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...

4개월 전

문제를 풀었습니다


Generate pi using logarithm
Generate pi using logarithm

4개월 전

문제를 풀었습니다


factorial_calc(n)
Write a MATLAB function called factorial_calc(n) that takes a positive integer n as input and calculates the factorial of n. The...

4개월 전

문제를 풀었습니다


Find Min and Max Differences in a Vector
Given an array of integers, return the absolute largest and smallest (non zero) difference between any two numbers in the array....

4개월 전

문제를 풀었습니다


Distancia Vetores
Dados dois vetores a = (x1, y1) e b = (x2, y2). Calcule a distância entre os vetores e verifique se estão perto (distancia < 10)...

4개월 전

문제를 풀었습니다


Return the sequence element I
Given a positive integer, x, return a positive integer, y, which is the xth term in the sequence [1 2 2 3 3 3...], in which one ...

4개월 전

문제를 풀었습니다


Is it column vector?
Is it column vector? Check vector for column vector without using iscolumn function.

4개월 전

문제를 풀었습니다


Simple Circuit of Resistors

4개월 전

문제를 풀었습니다


Back to basics 20 - singleton dimensions
Covering some basic topics I haven't seen elsewhere on Cody. Remove the singleton dimensions from the input variable (e.g. if...

4개월 전

문제를 풀었습니다


Basics: 'Find the eigenvalues of given matrix
Find the eigenvalues y for a given matrix x.

4개월 전

문제를 풀었습니다


Make an identity matrix whose diagonal elements are 1:n
For a given input n, make an n by n identity matrix that contains the elements 1:n along its diagonal. For example, if input=5: ...

4개월 전

더 보기