Beantwortet
Ensuring that a number is present in a string?
This can be solved nicely using MATLAB regular expressions. The idea is to look ahead from the start of the line to see if eac...

fast 12 Jahre vor | 2

| akzeptiert

Gelöst


Optimally fill a container with elements of different sizes
Given a row vector V of different numerical values and a size limit L, return a 1x2 vector A, containing (a) the largest sum of ...

mehr als 12 Jahre vor

Gelöst


rot45 : a different aproach
Inspired by problem 1840. <http://www.mathworks.com/matlabcentral/cody/problems/1840-rotate-matrix-clockwise-45-degree> ...

mehr als 12 Jahre vor

Gelöst


Create a v-notch vector without "sort" function
Given a vector vec, create a v-shaped vector as shown below: vec = [ 10 2 3 89 5 7 90 0 12] ...

mehr als 12 Jahre vor

Gelöst


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

mehr als 12 Jahre vor

Gelöst


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

mehr als 12 Jahre vor

Gelöst


07 - Common functions and indexing 6
Create a variable _m_ as a magic square with the size 6 x 6 Magic squares are defined as square matrices, where the sum of a...

mehr als 12 Jahre vor

Gelöst


Matrix rotation as per given angle
Given a user defined matrix and angle of rotation, rotate the elements of output matrix as clockwise or anti-clockwise. Angle wi...

mehr als 12 Jahre vor

Gelöst


Matrix to column conversion
Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

mehr als 12 Jahre vor

Gelöst


Min of a Matrix
Return the minimum value in the given matrix.

mehr als 12 Jahre vor

Gelöst


Rotate Matrix Both Direction (45 Degree)
*Matrix (3x3 only) rotation*: 3 inputs: *x* matrix, *n* times and *m* option. output: *y* matrix with *n x 45* degree ...

mehr als 12 Jahre vor

Gelöst


Rotate Matrix Clockwise (45 Degree)
*Matrix (3x3 only) rotation clockwise*: 2 inputs: *x* matrix and *n* times. output: *y* matrix with *n x 45* degree ro...

mehr als 12 Jahre vor

Gelöst


Pascal's pyramid
In Pascal's triangle each number is the sum of the two nearest numbers in the line above: 1 1 1 ...

mehr als 12 Jahre vor

Gelöst


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal.

mehr als 12 Jahre vor

Gelöst


Make an N-dimensional Multiplication Table
*INSTRUCTIONS* This is a multi-dimensional variant of the normal multiplication table used to teach elementary students multi...

mehr als 12 Jahre vor

Gelöst


Pluralization
Define function plu(n) that returns '' (an empty string) if n=1, or 's' otherwise. This is handy for displaying messages from a...

mehr als 12 Jahre vor

Gelöst


Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

mehr als 12 Jahre vor

Gelöst


Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...

mehr als 12 Jahre vor

Gelöst


sum of non-primes
The sum of the non-primes below 10 is 1+4+6+8+9+10=38 Find the sum of all the non-primes below the input, N.

mehr als 12 Jahre vor

Gelöst


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

mehr als 12 Jahre vor

Gelöst


04 - Scalar Equations 1
Define the variable a: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> Use this to calculate x: <<http://samle.dk/STTBD...

mehr als 12 Jahre vor

Gelöst


Read a Soroban Abacus
*Description* The Soroban is the name of the modern Japanese abacus. Information on reading a Soroban can be found <http://we...

mehr als 12 Jahre vor

Gelöst


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

mehr als 12 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 12 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 12 Jahre vor

Gelöst


Eight Queens Solution Checker
Write a function to verify whether an arrangement of queens on a chessboard is a valid solution to the classic <http://en.wikipe...

mehr als 12 Jahre vor

Gelöst


Negation the hard way
Write a function that has the following property: f(f(x)) = -x for any numeric array x. Note that there is no restriction on ...

mehr als 12 Jahre vor

Problem


Negation the hard way
Write a function that has the following property: f(f(x)) = -x for any numeric array x. Note that there is no restriction on ...

mehr als 12 Jahre vor | 1 | 71 Lösungsvorschläge

Problem


Find vampire numbers
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such th...

mehr als 12 Jahre vor | 12 | 394 Lösungsvorschläge

Problem


Find all vampire fangs
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such th...

mehr als 12 Jahre vor | 2 | 77 Lösungsvorschläge

Mehr laden