Solved


Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

3 meses ago

Solved


Average of square wave
given positive and negative peak , calculate dc level, 50% duty cycle

3 meses ago

Solved


Evaluate Polynomial
Given a polynomial equation coefficients in a vector p, you have to return its value at x. Example: For inputs p and x ...

3 meses ago

Solved


Matlab Basics II - Create a vector with a repeated entry
Create a row vector of length n, filled with 4's, for example, if n = 3 output = [4 4 4] make sure to round UP when n is a...

3 meses ago

Solved


Negative Infinity
Round the given array a towards negative infinity.

3 meses ago

Solved


metre to feet converter
The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

3 meses ago

Solved


2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cor...

3 meses ago

Solved


Solving Quadratic Equations (Version 1)
Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...

3 meses ago

Solved


Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

3 meses ago

Solved


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

3 meses ago

Solved


Determine if input is divisible by three.
Given a positive integer, n, determine if n is divisible by 3. If yes, the function should output true. If no, false.

3 meses ago

Solved


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

3 meses ago

Solved


Back to basics 12 - Input Arguments
Covering some basic topics I haven't seen elsewhere on Cody. Return a value equal to the number of input arguments to the fun...

3 meses ago

Solved


Basic arrays operations.
Apply element-by-element binary operation 'fun' to two arrays (A and B).

3 meses ago

Solved


Product of elements in row
Product of matrix such that a=[3 3 1] b=9

3 meses ago

Solved


construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x. E...

3 meses ago

Solved


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

3 meses ago

Solved


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

3 meses ago

Solved


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

3 meses ago

Solved


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

3 meses ago

Solved


05 - Vector Equations 1
Define the vector _cVec_: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of -0....

3 meses ago

Solved


Finding an element in a vector
x is a vector of unknown length your function should return the index of the first element in the vector that is greater than...

3 meses ago

Solved


Building matrices
If you have matrix A, create matrix B using matrix A as an "element" A = [1 2 3 4; 5 6 7 8...

3 meses ago

Solved


How many Integers?
Count the integers in a given vector |v|. You *must* use a loop to count each element separately. Examples: Input: v...

3 meses ago

Solved


Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

3 meses ago

Solved


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

3 meses ago

Solved


Product of Array
Given an array of numbers. Get the product of the array.

3 meses ago

Solved


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

3 meses ago

Solved


Sum of Two Numbers
Given two integer numbers x and y, calculate their sum and put it in z. Examples: Inputs x = 2, y = 4 Output z is 6 ...

3 meses ago

Solved


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

3 meses ago

Load more