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

6 years ago

Solved


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

6 years ago

Solved


Remove the Zero
Given an array n, remove all zeros

6 years ago

Solved


07 - Common functions and indexing 4
Define the matrix _cMat_: <<http://samle.dk/STTBDP/Assignment1_3c.png>> ( _cMat_ = 10x10 matrix where the numbers from 1 t...

6 years ago

Solved


02 - Vector Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of ...

6 years ago

Solved


Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

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

6 years ago

Solved


Find the "ordinary" or Euclidean distance between A and Z
A, B and Z define three points in the 3D _Euclidean_ space of the form: A = [x1;y1;0]; B = [x2;y2;0]; Z = [x2;y2;z]; Find th...

6 years ago

Solved


Solve the set of simultaneous linear equations
Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)

6 years ago

Solved


Element by element multiplication of two vectors
Given two input vectors, return the element-by-element product. Example A = [1 2 3] B = [7 3 1] The answer should be...

6 years ago

Solved


03 - Matrix Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3a.png>> A 9x9 matrix full of 2's (Hint: use *ones* o...

6 years ago

Solved


Positive Infinity
Round the array a towards positive infinity

6 years ago

Solved


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal. (Include all elements that are part ...

6 years ago

Solved


Basics: 'Find the eigenvalues of given matrix
Find the eigenvalues y for a given matrix x.

6 years ago

Solved


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

6 years ago

Solved


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

6 years ago

Solved


Back to basics 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix and row and column, output the index of th...

6 years ago

Solved


Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...

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

6 years ago

Solved


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

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

6 years ago

Solved


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

6 years ago

Solved


07 - Common functions and indexing 6
Create a variable _m_ as a magic square with the size 6 x 6 Magic squares are defined as square matrices, where the sum of a...

6 years ago

Solved


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

6 years ago

Solved


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

6 years ago

Solved


03 - Matrix Variables 6
Make _fMat_ be a 5x3 matrix of random integers with values from -3 to 3 (Hint: use *randi*)

6 years ago

Solved


Given an unsigned integer x, find the largest y by rearranging the bits in x
Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

6 years ago

Solved


A matrix of extroverts
Now that the introverts have had their script, the extroverts spoke up (naturally!) and demanded one as well. You will be given...

6 years ago

Solved


Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

6 years ago

Solved


Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...

6 years ago

Load more