Solved


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

4 days ago

Solved


Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

4 days ago

Solved


05 - Vector Equations 2
Define the vectors _aVec_ and _bVec_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http://samle.dk/STTBDP/Assig...

4 days ago

Solved


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

4 days ago

Solved


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

4 days ago

Solved


Draw 'C'.
Given x as input, generate a x-by-x matrix 'C' using 0 and 1. example: x=4 ans= [0 1 1 1 1 0 0 0 ...

4 days ago

Solved


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

4 days ago

Solved


Create a constant offset.
Add a constant offset to an array. Example a = [1 3 5 9] offset = 2 y = [3 5 7 11]

4 days ago

Solved


Barnes G-Function
Evaluate the Barnes G-Function at a given (integral) value. %Example 1 in = 1; out = 1; %Example 1 in = 4; out = 2; ...

4 days ago

Solved


Max index of 3D array
Given a three dimensional array M(m,n,p) write a code that finds the three coordinates x,y,z of the Maximum value. Example ...

5 days ago

Solved


Find the peak 3n+1 sequence value
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...

5 days ago

Solved


Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

5 days ago

Solved


Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

5 days ago

Solved


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

5 days ago

Solved


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

5 days ago

Solved


Divide by 4
Given the variable x as your input, divide it by 4 and put the result in y.

5 days ago

Solved


04 - Scalar Equations 2
Define the variables a and b: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> <<http://samle.dk/STTBDP/Assignment1_4-b.png>...

5 days ago

Solved


Back to basics 26 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of strings of all MATLAB keywords.

5 days ago

Solved


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

5 days ago

Solved


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

5 days ago

Solved


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

5 days ago

Solved


Getting the indices from a matrix
Inspired by Problem 645. Getting the indices from a matrix. Given a matrix A (or a vector), return the indices (always in row...

5 days ago

Solved


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

5 days ago

Solved


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

5 days ago

Solved


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

5 days ago

Solved


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

5 days ago

Solved


Matrix with different incremental runs
Given a vector of positive integers a = [ 3 2 4 ]; create the matrix where the *i* th column contains the vector *1:a(i)...

5 days ago

Solved


Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...

5 days ago

Solved


Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

5 days ago

Solved


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

5 days ago

Load more