Solved


Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...

9 years ago

Solved


The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

9 years ago

Solved


Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

9 years ago

Solved


Find the nearest integer
Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...

9 years ago

Solved


Max of a Vector
Write a function to return the max of a vector

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

9 years ago

Solved


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

9 years ago

Solved


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

9 years ago

Solved


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

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

9 years ago

Solved


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

9 years ago

Solved


Determine the square root
Determine the square root of the value the user has entered, n.

9 years ago

Solved


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

9 years ago

Solved


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

9 years ago

Solved


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

9 years ago

Solved


Make a Palindrome Number
Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...

9 years ago

Solved


03 - Matrix Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3c.png>> A 10x10 matrix where the numbers from 1 to 100 ...

9 years ago

Solved


Basic commands - amount of inputs
Make a function, which will return amount of given inputs Example: amountinput(1,2,4,3,10) -> 5 , because we gave functio...

9 years ago

Solved


what can you get for exactly amount of money
You go to store, where each product has price. Prices are in vector s = [ 195 125 260 440 395 290] and you have amount ...

9 years ago

Solved


Create cosine function out of sine
Please dont use cos(x) directly

9 years ago

Solved


Radiation Heat Transfer — View Factors (1)
View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...

9 years ago

Solved


rectangle in circle
In the figure below, the rectangle at the corner measures a cm x b cm. What is the radius of the circle in cm? <<http://www....

9 years ago

Solved


Avalaible area: wall construction
You need to build a wall to enclose a certain area. Calculate the available area after you build the wall. Assumptions * ...

9 years ago

Solved


Slicing the cube
A bored matlab enthusiast has a cube with volume n^3. He decides to paint the entire surface of the cube red. Then, with slices...

9 years ago

Solved


All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

9 years ago

Solved


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

9 years ago

Solved


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

9 years ago

Solved


How to calculate log?
There is a log that have base 5. How to calculate? log5(x)?

9 years ago

Solved


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

9 years ago

Solved


Calculate the CIRCUMFERENCE of circle.
Given the radius is 2, the circumference will be 12.5663.

9 years ago

Load more