Under Grad. Student of Water Resources Engineering.

Solved

Combine Data With Gaps

Combine data sets a and b where the datasets have "gaps" or unique points. Example: Input a = [1,0; 2,1; ...

ein Tag ago

Solved

Are you in or are you out?

Given vertices specified by the vectors xv and yv, and a single point specified by the numbers X and Y, return "true" if the poi...

ein Tag ago

Solved

Cull vector elements that contain a specified digit

Given inputs of (1) a row vector and (2) a digit, identify the elements of that vector that contain the digit, remove them, and ...

ein Tag ago

Solved

Is my wife right? Now with even more wrong husband

Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

ein Tag ago

Solved

Sum the real and imaginary parts of a complex number

Sum the real and imaginary parts of a complex number. Example c = 1+2i has the solution 1 + 2 = 3

ein Tag ago

Solved

Which quadrant?

Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

ein Tag ago

Solved

Matlab Basics II - Velocity of a particle

A particle is moving in space, such that it's velocity is given by: <<http://s30.postimg.org/5rf1xtvj5/cody1.png>> write a...

ein Tag ago

Solved

Matlab Basics II - Unit Conversion

Write a function that converts Kg to lbs, returns the answer to the nearest 1/100th of a pound

ein Tag ago

Solved

Matlab Basics - Set unwanted parts of a vector to zero

Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. Example x = [1 2 3 4 5 6 7] --> ...

ein Tag ago

Solved

Wind Chill Computation

On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

ein Tag ago

Solved

poll: would you like the regexp (?@cmd) functionality to be banned in Cody?

This problem is a poll (and a little bit of "white hat hacktivism" as well) regarding Cody users sentiment about the use of rege...

ein Tag ago

Solved

Back to basics 7 - Equal NaNs

Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

2 Tage ago

Solved

Champernowne Constant

The <http://en.wikipedia.org/wiki/Champernowne_constant Champernowne constant> is a real number whose digits in decimal represen...

2 Tage ago

Solved

Number of toolboxes?

Return a number equal to the number of toolboxes available to the Cody solvers.

3 Tage ago

Solved

The Answer to Life, the Universe, and Everything

A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

3 Tage ago

Solved

Convert Decimal Number to Hex number (including non integer value)

Convert Decimal Number to Hex number (including non integer value) E.X. (2598.675) in decimal = A26.ACCC in hexa

4 Tage ago

Solved

Generate vector according to sign of vector

Generate vector according to sign of vector Example: If A=[-2 0 5] then output must be[-1 0 1] meaning that for negative n...

4 Tage ago

Solved

Append two matrix as shown below example

Append two matrix as shown below example A=[1 2; 3 4] and B=[5 6;7 8] Answer must be 1 2 5 6 3...

4 Tage ago

Solved

Remove All elements less than 5

Given an input vector x, remove all elements of x less than 5 . Example: Input x = [ 1 2 5 7 3 ] Output y is [ 5 7 ...

4 Tage ago

Solved

Calculate numerical integration.

x=0:0.01:1 y=@(x)x.^2 Using given two inputs(x and y), conduct numerical integration in x. (hint: trapz)

4 Tage ago

Solved

Calculate inverse matrix in m by n matrix

x=(1:10)' y=roundn(2*x+7*rand(size(x)),-1) a*x=y Estimate a using inverse matrix calculation. This is principle of li...

4 Tage ago

Solved

Change matrix to vector

Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...

4 Tage ago

Solved

Matrix FUN

Given a Matrix M, find out the number of elements of matrix that are divisible by 3. M = [1 2 3;4 5 6;7 8 9]; ou...

4 Tage ago

Solved

Write a function man that takes a row vector v and returns a matrix H as follows..

Write a function called man that takes a row vector v as an input and returns a matrix H whose first column consist of the eleme...

4 Tage ago

Solved

Find MPG of Lightest Cars

The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...

4 Tage ago

Solved

Rescale Scores

Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...

4 Tage ago

Solved

Horizontal matrix sort

Given a matrix x with n rows and m columns, return a matrix y with n rows and 2m columns, such that every row in x is sorted fro...

5 Tage ago

Solved

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

5 Tage ago

Solved

Return fibonacci sequence do not use loop and condition

Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: ...

5 Tage ago