Gelöst


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

mehr als 9 Jahre vor

Gelöst


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

mehr als 9 Jahre vor

Gelöst


Number of Horns on a unicorn!
Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

mehr als 9 Jahre vor

Gelöst


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

mehr als 9 Jahre vor

Gelöst


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

mehr als 9 Jahre vor

Gelöst


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

mehr als 9 Jahre vor

Gelöst


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

mehr als 9 Jahre vor

Gelöst


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

mehr als 9 Jahre vor

Gelöst


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

mehr als 9 Jahre vor

Gelöst


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

mehr als 9 Jahre vor

Gelöst


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

mehr als 9 Jahre vor

Gelöst


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

mehr als 9 Jahre vor

Gelöst


Celcius to Kelvin
Convert Celsius degrees to Kelvin temperature.

mehr als 9 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:*...

mehr als 9 Jahre vor

Gelöst


Say something funny
Say something funny, or not. Your solution will be (fully automatically and objectively) scored based on how clever or funny ...

mehr als 9 Jahre vor

Gelöst


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

mehr als 9 Jahre vor

Gelöst


Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

mehr als 9 Jahre vor

Gelöst


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

mehr als 9 Jahre vor

Gelöst


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

mehr als 9 Jahre vor

Gelöst


Who is the smartest MATLAB programmer?
Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

mehr als 9 Jahre vor

Gelöst


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

mehr als 9 Jahre vor

Gelöst


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

mehr als 9 Jahre vor

Gelöst


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Problem


Product of elements in row
Product of matrix such that a=[3 3 1] b=9

mehr als 9 Jahre vor | 2 | 270 Lösungsvorschläge

Problem


swap two no. without using third variable
a=input('enter value of a'); b=input('enter value of b'); a=a+b; b=a-b a=-b+a

mehr als 9 Jahre vor | 0 | 0 Lösungsvorschläge

Gelöst


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

mehr als 9 Jahre vor

Gelöst


Determine the length of a string of characters
Determine the length of a string of characters

mehr als 9 Jahre vor

Gelöst


Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.

mehr als 9 Jahre vor

Gelöst


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

mehr als 9 Jahre vor

Mehr laden