Gelöst


Multiply Column
Given two input, one matrix and one scalar number For example A is a matrix given A = [ 1 2 2 5 2 5 2 3 4 6...

fast 2 Jahre vor

Gelöst


Reshape a Vector
Write a function that accept three inputs. The first one is a row vector S. The second and third arguments are m and n which de...

fast 2 Jahre vor

Gelöst


imaginary results
Return the value of the imaginary number i to the power of input argument n.

fast 2 Jahre vor

Gelöst


Golden ratio
Calculate the golden ratio. Hint: phi^2 = phi + 1.

fast 2 Jahre vor

Gelöst


Replace 0 to NaN!
In given matrix A=[1 nan nan; 2 2 nan; nan nan 1]; replace NaN to 0. Use matrix A as a input.

fast 2 Jahre vor

Gelöst


Change matrix to vector
Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...

fast 2 Jahre vor

Gelöst


Find the sum of n squares
What is the sum of the squares of the first n integers?

fast 2 Jahre vor

Gelöst


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

fast 2 Jahre vor

Gelöst


Simpson's Paradox - Calculate correlation coefficients for groups of data
Simpson's Paradox is a statistical phenomenon where groups of data can have a characteristic while the whole data set together h...

fast 2 Jahre vor

Gelöst


Dog Statistics
The vectors ht and wt contains the heights and weights of 20 golden retrievers. In some cases, it was not possible to make both ...

fast 2 Jahre vor

Gelöst


Indirect Sorting
Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

fast 2 Jahre vor

Gelöst


Will there be a new leader?
Simply answer the title.

fast 2 Jahre vor

Gelöst


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

fast 2 Jahre vor

Gelöst


Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

fast 2 Jahre vor

Gelöst


The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

fast 2 Jahre vor

Gelöst


Create an anti-identity matrix
Create an anti-identity matrix of given dimension. Examples n = 2 A = [0 1; 1 0] n = 3 A = [0 0 1; 0 1 0; 1 0 0...

fast 2 Jahre vor

Gelöst


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

fast 2 Jahre vor

Gelöst


execute the declaration in strings and return value
execute the commands in strings and return value input='a=23' output=23

fast 2 Jahre vor

Gelöst


most frequent character
Obtain the most frequent character. For example, s='balaram'; output='a'; If there is a tie between letters, return t...

fast 2 Jahre vor

Gelöst


interesting center of magic matrix
output the centre of magic matrix of n input=7; output=25

fast 2 Jahre vor

Gelöst


ascii value
let input='a' output=97

fast 2 Jahre vor

Gelöst


index of n^2 in magic(n)
input=5 magic matrix 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 ...

fast 2 Jahre vor

Gelöst


Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

fast 2 Jahre vor

Gelöst


ASCii Code
Using matlab, give the symbol that is associated with ASCii code 122

fast 2 Jahre vor

Gelöst


Cos Function
x is the abscissa. find the absolute value of cosine of -x and the same value with changed sign.

fast 2 Jahre vor

Gelöst


frame of the matrix
Given the matrix M, return M without the external frame.

fast 2 Jahre vor

Gelöst


Crunch that matrix!
You are given an M x N matrix. Write a script that will compress this matrix into an M x (N/3) matrix, where each of the terms ...

fast 2 Jahre vor

Gelöst


Solving a quadratic equation
Given a, b ​​and c, Return the solution of the following quadratic equation: a*x^2 + b*x + c = 0.

fast 2 Jahre vor

Gelöst


Divisors of an integer
Given a number N, return a vector V of all integers that divide N. For example, N = 10 Then V=[1 2 5 10]

fast 2 Jahre vor

Gelöst


Implement a ROT13 cipher
Replace each character in string s1 with the character that is shifted 13 positions from it (wrap back to the beginning if neces...

fast 2 Jahre vor

Mehr laden