Gelöst


Build the Well
Calculate the total time taken for building 'n' wells given : Worker A takes a hr to build the well alone Worker B takes b hr...

ein Tag vor

Gelöst


Bag of apples
find probabilty of getting red apples from a bag of 'r' red and 'g' green apples.

ein Tag vor

Gelöst


How many offices does MathWorks have in the UK
Please write a function that returns the number of offices MathWorks has in the UK.

ein Tag vor

Gelöst


Back to basics 15 - Benchmark
Covering some basic topics I haven't seen elsewhere on Cody. Return an array of the benchmark values for MATLAB.

ein Tag vor

Gelöst


Pluralization
Define function plu(n) that returns '' (an empty string) if n=1, or 's' otherwise. This is handy for displaying messages from a...

ein Tag vor

Gelöst


Energy Conversion 1

7 Tage vor

Gelöst


Find the max element of the array
Find the max element of the array

7 Tage vor

Gelöst


Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

7 Tage vor

Gelöst


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

7 Tage vor

Gelöst


Explode string
Break a sentence into cell of words

7 Tage vor

Gelöst


Product of Array
Given an array of numbers. Get the product of the array.

7 Tage vor

Gelöst


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

7 Tage vor

Gelöst


Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

7 Tage vor

Gelöst


Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

7 Tage vor

Gelöst


Let's make puddings !
We will make puddings with eggs, milk and sugar. To make one pudding, we need one egg, 140(cc) of milk, 15 (g) of sugar. Now W...

7 Tage vor

Gelöst


Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

7 Tage vor

Gelöst


Sum of diagonals elements of a matrix
Given a matrix, return the sum of all the elements across the diagonals. E.g. A = [1 2 3; 4 5 6; 7 8 9;...

7 Tage vor

Gelöst


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

8 Tage vor

Gelöst


Test for balanced parentheses
Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

8 Tage vor

Gelöst


Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.

8 Tage vor

Gelöst


Solve the equation. Find X.

8 Tage vor

Gelöst


Laws of motion 1

8 Tage vor

Gelöst


Total energy

8 Tage vor

Gelöst


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

8 Tage vor

Gelöst


World Cup 2018 Prediction!
Which team will be the winner?

8 Tage vor

Gelöst


Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

8 Tage vor

Gelöst


Find last zero for each column
Given a numeric array of arbitrary size, return the row index of the last zero for each column. If a column contains all nonzero...

8 Tage vor

Gelöst


Velocity Conversion
Given a velocity in mph, convert it to km/h. Round the answer to the fourth decimal place.

8 Tage vor

Gelöst


NOT
If a not equal to zero, b = true, else, b = false.

8 Tage vor

Gelöst


Find Logic 27

9 Tage vor

Mehr laden