Solved


Matlab Basics - Sum a vector
Write a script to add up all the elements in a vector e.g. x = [1 2 3 4] --> output = 10

meer dan 7 jaar ago

Solved


length of a vector
Find twice the length of a given vector.

meer dan 7 jaar ago

Solved


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

meer dan 7 jaar ago

Solved


Remainder
Make 'y' equal to the remainder of 27 divided by 5. When x=27 and t=5

meer dan 7 jaar ago

Solved


Rounding
Round 10.67 and make 'y' equal to that number.

meer dan 7 jaar ago

Solved


UICBioE240 problem 1.9
Swap the first and last columns of a matrix. So if A = [12 4 7; 5 1 4]; B = [7 4 12; 4 1 5]; ...

meer dan 7 jaar ago

Solved


Rotate a matrix for 180 degree
Rotate a matrix for 180 degree for eg: x=[1 2 3 4] y=[4 3 2 1]

meer dan 7 jaar ago

Solved


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

meer dan 7 jaar ago

Solved


Second smallest number
What is the second smallest number in x? example: x = [1 2 3 4 5 6 7 8 9] y = 2

meer dan 7 jaar ago

Solved


Number of nonzero elements in matrix
Calculate the number of nonzero elements for given matrix

meer dan 7 jaar ago

Solved


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

meer dan 7 jaar ago

Solved


Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

meer dan 7 jaar ago

Solved


Back to basics 7 - Equal NaNs
Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

meer dan 7 jaar ago

Solved


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

meer dan 7 jaar ago

Solved


Solve t^(a*x^2+b*x+c)=s
Solve t^(a*x^2+b*x+c)=s. Return x vector as result. Example a=1, b=2, c=1, t=3, s=15. Result x(1)= 0.5700 x(2)=-2.5700 H...

meer dan 7 jaar ago

Solved


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

meer dan 7 jaar ago

Solved


Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

meer dan 7 jaar ago

Solved


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

meer dan 7 jaar ago

Solved


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

meer dan 7 jaar ago

Solved


Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<http://upload.wikimedia.org/wikipe...

meer dan 7 jaar ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

meer dan 7 jaar ago

Solved


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

meer dan 7 jaar ago

Solved


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

meer dan 7 jaar ago

Solved


Concatenating arrays
* Assign studentIDs with concatenated row arrays groupA and groupB

meer dan 7 jaar ago

Solved


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

meer dan 7 jaar ago

Solved


Double colon operator: Increment by x
* Construct a row array countValues from 0 to 25, elements incremented by incrementValue. Ex: If incrementValue is 5, countVa...

meer dan 7 jaar ago

Solved


Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.

meer dan 7 jaar ago

Solved


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

meer dan 7 jaar ago

Solved


Add two numbers
Add two numbers (For beginners)

meer dan 7 jaar ago

Solved


given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

meer dan 7 jaar ago

Load more