Solved


Back to basics 13 - Input variables
Covering some basic topics I haven't seen elsewhere on Cody. Return as a string the name of the input variable to the functio...

nästan 7 år ago

Solved


Find nearest prime number less than input number
Find nearest prime number less than input number . For example: if the input number is 125, then the nearest prime number whi...

nästan 7 år ago

Solved


01 - Scalar variables
Create the following variables: <<http://samle.dk/STTBDP/Assignment1_1.png>>

nästan 7 år ago

Solved


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

nästan 7 år ago

Solved


Reverse a matrix
Its simple. You have to reverse a given matrix.

nästan 7 år ago

Solved


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.

nästan 7 år ago

Solved


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

nästan 7 år ago

Solved


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

nästan 7 år ago

Solved


Positive Infinity
Round the array a towards positive infinity

nästan 7 år ago

Solved


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

nästan 7 år ago

Solved


Omit columns averages from a matrix
Omit columns averages from a matrix. For example: A = 16 2 3 13 5 11 10 8 9 7 ...

nästan 7 år ago

Solved


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

nästan 7 år ago

Solved


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

nästan 7 år ago

Solved


Negative Infinity
Round the given array a towards negative infinity.

nästan 7 år ago

Solved


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

nästan 7 år ago

Solved


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

nästan 7 år ago

Solved


Number of Horns on a unicorn!
Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

nästan 7 år ago

Solved


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

nästan 7 år ago

Solved


Add two numbers
Add two numbers (For beginners)

nästan 7 år ago

Solved


03 - Matrix Variables 5
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3e.png>>

nästan 7 år ago

Solved


Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

nästan 7 år 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

nästan 7 år ago

Solved


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

nästan 7 år ago

Solved


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

nästan 7 år ago

Solved


Cody Matlab Version
What is the current Cody Matlab Release? *Output:* string *Examples:* '(R2012a)' or 'R2012a' Hint: We have mo...

nästan 7 år ago

Solved


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

nästan 7 år 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...

nästan 7 år ago

Solved


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

nästan 7 år ago

Solved


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

nästan 7 år ago

Solved


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

nästan 7 år ago

Load more