23 total contributions since 2016

Was born 1970 in Serbia, Yugoslavia.

Started using Matlab in 1995.

Solved

Swap the first and last columns

Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

11 maanden 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,...

11 maanden ago

Solved

Evaluating a polynomial

Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

11 maanden ago

Solved

Pascal's Triangle

Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

11 maanden ago

Solved

Back to basics 6 - Column Vector

Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

11 maanden ago

Solved

Flip the vector from right to left

Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

11 maanden ago

Solved

Swap the input arguments

Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

11 maanden ago

Solved

Sum of the Matrix Elements

Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

11 maanden ago

Solved

Rounding off numbers to n decimals

Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

11 maanden ago

Solved

Create sequnce 1 4 9 16 25.........

Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input

11 maanden ago

Solved

06 - Matrix Equations 3

Define the matrices _aMat_, _bMat_, and _cMat_: <<http://samle.dk/STTBDP/Assignment1_3a.png>> ( _aMat_ = 9x9 matrix full o...

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

12 maanden ago

Solved

What is Sum Of all elements of Matrix

Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

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

12 maanden ago

Solved

Powers Of

Fill the vector with powers of 2, so that vector(1) is 2^1, vector(2) is 2^2, etc. Stop with vector(10). Complete the function ...

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

12 maanden ago

Solved

Bottles of beer

Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

12 maanden ago

Solved

Temperature conversion

Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...

12 maanden ago

Solved

Sum all integers from 1 to 2^n

Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

12 maanden ago

Solved

Pizza!

Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

bijna 4 jaar ago