Risolto


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

oltre 7 anni fa

Risolto


What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

oltre 7 anni fa

Risolto


Negative Infinity
Round the given array a towards negative infinity.

oltre 7 anni fa

Risolto


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

oltre 7 anni fa

Risolto


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

oltre 7 anni fa

Risolto


Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples : n=2, A=[1 2 3] -> [1 1 2 2 3 3] n=0...

oltre 7 anni fa

Risolto


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

oltre 7 anni fa

Risolto


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

oltre 7 anni fa

Risolto


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

oltre 7 anni fa

Risolto


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

oltre 7 anni fa

Risolto


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

oltre 7 anni fa

Risolto


Complex number
For complex number c=a+bi, write code that will add a and b together.

oltre 7 anni fa

Risolto


Generate pi using logarithm
Generate pi using logarithm

oltre 7 anni fa

Risolto


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

oltre 7 anni fa

Risolto


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

oltre 7 anni fa

Risolto


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

oltre 7 anni fa

Risolto


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

oltre 7 anni fa

Risolto


Calculate square and cube of number
Calculate square and cube of number x

oltre 7 anni fa

Risolto


square number
Square a number

oltre 7 anni fa

Risolto


Square a Number
Given an input x, return y, which is equal to the square of x.

oltre 7 anni fa

Risolto


Create sequnce 1 4 9 16 25.........
Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input

oltre 7 anni fa

Risolto


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

oltre 7 anni fa

Risolto


concatenate the elements
you should concatenate the elements of a matrix in one dimensional array, for example if the input is A = [1 2 3; 4 5 6; 7 ...

oltre 7 anni fa

Problema


concatenate the elements
you should concatenate the elements of a matrix in one dimensional array, for example if the input is A = [1 2 3; 4 5 6; 7 ...

oltre 7 anni fa | 0 | 65 risolutori

Risolto


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

oltre 7 anni fa

Risolto


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

oltre 7 anni fa

Risolto


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

oltre 7 anni fa

Risolto


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

oltre 7 anni fa

Risolto


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

quasi 8 anni fa

Risolto


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

quasi 8 anni fa

Carica altro