Risolto


Matrix of almost all zeros, except for main diagonal
Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewh...

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


Is My Wife Wrong?
Answer the question. (see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...

quasi 10 anni fa

Risolto


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

quasi 10 anni fa

Risolto


Vector of numbers divisible by 3
* Input(n) - any integer * Output(v) - vector with numbers divisible by 3(exept 0) starting from n to 0 Examples: * n=6...

quasi 10 anni fa

Risolto


Getting the indices from a matrice
Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

quasi 10 anni fa

Risolto


Relative ratio of "1" in binary number
Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

quasi 10 anni fa

Risolto


Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

quasi 10 anni fa

Risolto


square number
Square a number

quasi 10 anni fa

Risolto


Area of a circle
Find the value for area of the circle if diameter is given

quasi 10 anni fa

Risolto


Determine the mean of matrix
Determine the mean of matrix without using mean function Hint: use simple algorithm

quasi 10 anni fa

Risolto


2倍してみよう - ここからスタート!
初めにこの問題を試してみよう。 入力としてxを与え、それを2倍して結果をyに代入せよ。 Examples: Input x = 2 Output y is 4 Input x = 17 Output y is 34 ...

quasi 10 anni fa

Risolto


Times 3 problem
When you enter the number, it should return the number multiplied by 3

quasi 10 anni fa

Risolto


Cody Matlab Version
What is the current Cody Matlab Release? *Output:* string *Examples:* '(R2012a)' or 'R2012a' Hint: We have mo...

quasi 10 anni fa

Risolto


Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

quasi 10 anni fa

Risolto


Is my wife right?
Regardless of input, output the string 'yes'.

quasi 10 anni fa

Risolto


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

quasi 10 anni fa

Risolto


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

quasi 10 anni fa

Risolto


Largest Twin Primes
<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...

quasi 10 anni fa

Risolto


Sum of diagonals elements of a matrix
Given a matrix, return the sum of all the elements across the diagonals. E.g. A = [1 2 3; 4 5 6; 7 8 9;...

quasi 10 anni fa

Risolto


Check if equal
Return true if all the elements of an nD array are equal, false otherwise.

quasi 10 anni fa

Risolto


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

quasi 10 anni fa

Risolto


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Problema


Calculate geostrophic current
eta0=0.01; R=300; f=0.01; g=9.81; x=-500:50:500; y=-500:50:500; [x y]=meshgrid(x,y); eta=eta0*exp(-(x.^2+...

quasi 10 anni fa | 6 | 41 risolutori

Risolto


Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

quasi 10 anni fa

Risolto


Woodall number
Test whether the input is a Woodall number: <http://en.wikipedia.org/wiki/Woodall_number> _Please do not cheat by simply chec...

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


Close MATLAB with keyboard
Close MATLAB with keyboard without using mouse

quasi 10 anni fa

Carica altro