Solved


Compute LOG(1+X) in natural log
Compute LOG(1+X) in natural log

2 years ago

Solved


Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

2 years ago

Solved


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

2 years ago

Solved


Matlab Basics - Logical Tests I
Write a script to test whether a year number is for a leap year or not. eg. x = 1884 output = 1 eg. x = 3 output = 0

2 years ago

Solved


Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

2 years ago

Solved


Matlab Basics - Assigning Variables
Assign different types of data to variables: integer, double, and strings Example: A is a double, for example 2.34 B is a...

2 years ago

Solved


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

2 years ago

Solved


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

2 years 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

2 years ago

Solved


Sum of Two Numbers
Given two integer numbers x and y, calculate their sum and put it in z. Examples: Inputs x = 2, y = 4 Output z is 6 ...

2 years ago

Solved


Annual Salary
What is the annual salary of Mr. Cody if he works 40 hours a week and gets $x per hour and a yearly bonus of $2000? (Let, 50 wee...

2 years ago

Solved


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

2 years ago

Solved


ASCII code of a leter.
Given the letter, the output will show the corresponding ASCII code.

2 years ago

Solved


If you have matrix A, create matrix B using matrix A as an "element"
A = [1 2 3 4; 5 6 7 8] B = [1 2 3 4 1 2 3 4; 5 6 ...

2 years ago

Solved


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]

2 years ago

Solved


Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively

2 years ago

Solved


Create a square matrix of zeros of even order
Create a square matrix of zeros of even order

2 years ago

Solved


Calculate the base-10 logarithm of a number
Calculate the logarithm of number x

2 years ago

Solved


Square wave average calculation
Given its peak and duty cycle, calculate avg value of square wave

2 years ago

Solved


Don't be Greedy!
A list of assignments is given to the students along with the submission deadlines. Each of the assignment contains particular...

3 years ago

Solved


Minimal Path - 02
Given a matrix, find the minimal path from the top left to the bottom right by only moving to the right and down so that the sum...

3 years ago

Solved


Minimal Path - 01
Given a matrix, find the minimal path sum from the top left to the bottom right by only moving to the right and down. For exa...

3 years ago

Solved


Ugly numbers - 01
Ugly numbers are those whose prime factors are 2, 3 or 5. find the nth ugly number.

3 years ago

Solved


Sub-sequence - 02
Given two sequences, find the length of the longest common subsequence. a=[1,1,1,1,1,2,3,1,4] b=[2,3,0,0,9,5,4,1] longe...

3 years ago

Solved


Sum! Sum! Sum!
Calculate the sum of the sequence up to nth term >> a,aa,aaa,aaaa,... 2,22,222,2222,... [for a=2]

3 years ago

Solved


One-hot encoding

3 years ago

Solved


Capitalize
Capitalize the 1st letter of each input. Other letters should be lowercase. For example - a='alphaS' >> 'Alphas' a='1...

3 years ago

Solved


XOR fibonacci
a & b are the first two terms in the xor fibonacci sequence. Find the nth term of that sequence. XOR fib sequence is that in ...

3 years ago

Solved


Rotate a matrix without using rot90
rotate the input square matrix by certain degrees (e.g. 270 or 450 etc.) without using rot90 or flip function. its an extension...

3 years ago

Solved


Last Digit of fibonacci number

3 years ago

Load more