Gelöst


Calculate vowel / consonant ratio of a string
Given a string, calculate the ratio of vowels to consonants for example : x = 'This is a very good Day!' y = 7/11

etwa 5 Jahre vor

Gelöst


Number Power
Raise a number to itself.

etwa 5 Jahre vor

Problem


Angle between two vectors
Given 2 pairs of _cartesian co-ordinates_, determine the angle between the 2 vectors formed by the _points_ and the _origin_. An...

etwa 5 Jahre vor | 1 | 30 Lösungsvorschläge

Gelöst


Cube root of max value in a vector
Find the cube root of the maximum value in a vector

etwa 5 Jahre vor

Gelöst


Add consecutive integer numbers
Given consecutive numbers, add the numbers *without using the sum command in MATLAB.*

etwa 5 Jahre vor

Gelöst


Add 3 numbers
In this problem, you have to add three numbers a, b and c. Give output d = add(a,b,c)

etwa 5 Jahre vor

Gelöst


Double the next!
Given two numbers, m and n, find a matrix m x n where each element value is twice the value of the previous element. Starting fr...

etwa 5 Jahre vor

Gelöst


Just another sum (JAS)
*Task:* Write a function that takes a vector X and returns the alternating sum of X: X(1)-X(2)+X(3)-X(4)+... *Example...

etwa 5 Jahre vor

Gelöst


Calculate the square of a number (Super Easy)
The goal is to calculate the square (y) of a number (x). Good way to start MatLab for beginners.

etwa 5 Jahre vor

Gelöst


Easy problem
This is an easy problem. Just click on submit.

etwa 5 Jahre vor

Gelöst


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

etwa 5 Jahre vor

Gelöst


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

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

etwa 5 Jahre vor

Gelöst


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

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

etwa 5 Jahre vor

Gelöst


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


Create a vector
Create a vector from 0 to n by intervals of 2.

etwa 5 Jahre vor

Gelöst


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

etwa 5 Jahre vor

Gelöst


Find max
Find the maximum value of a given vector or matrix.

etwa 5 Jahre vor

Gelöst


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

etwa 5 Jahre vor

Gelöst


inner product of two vectors
inner product of two vectors

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


Find matching string from a list of strings
Write a function that returns a string that is a unique match (if it exists) of the string |inStr| from a list of strings |strLi...

etwa 5 Jahre vor

Gelöst


Convert String to Morse Code
Convert a given string to international <http://en.wikipedia.org/wiki/Morse_code Morse Code> * Strings will only have [A-z], ...

etwa 5 Jahre vor

Gelöst


letter yes yes & letter no no
Split a string into two strings, wherein the first string has all alphabetic letters and the second string has all the remaining...

etwa 5 Jahre vor

Gelöst


Compress strings (not springs)
Please remove excess space, limit one space between others, and no space before punctuation marks. * For example, 'Trendy , ...

etwa 5 Jahre vor

Gelöst


Removing rows from a matrix is easy - but what about inserting rows?
Assume A is a 5-by-5 matrix. A([2,4],:) = [] is a quick way to remove rows 2 and 4. Can you find a quick way to insert rows into...

etwa 5 Jahre vor

Mehr laden