A résolu


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

environ 11 ans il y a

A résolu


Remove white space from the string
Remove the white spaces (trailing and leading) from the input variable

environ 11 ans il y a

A résolu


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

environ 11 ans il y a

A résolu


Project Euler: Problem 8, Find largest product in a large string of numbers
Find the greatest product of five consecutive digits in an n-digit number. 73167176531330624919225119674426574742355349194934...

environ 11 ans il y a

A résolu


High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

environ 11 ans il y a

A résolu


Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false

environ 11 ans il y a

A résolu


02 - Vector Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of ...

environ 11 ans il y a

A résolu


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

environ 11 ans il y a

A résolu


Can you beat the lottery again (for hardcore coder) ?
Inspired by the Problem 1713 by Chris E. Here is the code that generates the first lottery number: rng('shuffle'); numb...

environ 11 ans il y a

A résolu


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

environ 11 ans il y a

A résolu


Getting the absolute index from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get the <http://www.ma...

environ 11 ans il y a

A résolu


Determine if a Given Number is a Triangle Number
*Description:* Determine if the elements of an input array are triangle numbers and return the result as an array with the sa...

environ 11 ans il y a

A résolu


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


Nearest
*Description* Find the value and index of the element in vector _x_ that is nearest to value _y_. _y_ should be able to be a ...

environ 11 ans il y a

A résolu


03 - Matrix Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3b.png>> A 9x9 matrix of zeros, but with the following v...

environ 11 ans il y a

A résolu


02 - Vector Variables 5
_eVec_ = _Hello_ ( _eVec_ is a string, which is a vector of characters )

environ 11 ans il y a

A résolu


02 - Vector Variables 4
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2d.png>> (Logarithmically spaced numbers between 1 and 1...

environ 11 ans il y a

A résolu


Least common multiple of many numbers
1:6 -> 60

environ 11 ans il y a

A résolu


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

environ 11 ans il y a

A résolu


middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

environ 11 ans il y a

A résolu


Number of Circles in a Number
Given a number, return the number of closed 'circles' in the base 10 numerical representation. Note: the number 4 has no circ...

environ 11 ans il y a

A résolu


02 - Vector Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2a.png>>

environ 11 ans il y a

A résolu


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

environ 11 ans il y a

A résolu


Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

environ 11 ans il y a

A résolu


03 - Matrix Variables 4
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3d.png>> A 3x4 NaN (Not a Number) matrix (Hint: use ...

environ 11 ans il y a

A résolu


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

environ 11 ans il y a

A résolu


Cannon Ball
Given g (acceleration due to gravity) and desired altitude x, find the minimum ground velocity of a cannon ball to reach x.

environ 11 ans il y a

A résolu


Celcius to Kelvin
Convert Celsius degrees to Kelvin temperature.

environ 11 ans il y a

A résolu


03 - Matrix Variables 6
Make _fMat_ be a 5x3 matrix of random integers with values from -3 to 3 (Hint: use *randi*)

environ 11 ans il y a

Charger plus