Solved


arithmetic progression
I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...

8 years ago

Solved


Wheat on a chessboard pt 2
If a chessboard were to have wheat placed upon each square such that x grains were placed on the first square and each successiv...

8 years ago

Solved


2D - Mean Filter
Assume you are given an "image" matrix of size NxM. Reduce the image noise by implementing a mean filter window of size 9 (a 3x3...

8 years ago

Solved


Percentage profit:4
If a shopkeeper is selling W gram of salt in 1 dollar he will face r% loss. How much salt he should sell in grams to make r% pro...

8 years ago

Solved


Calculate SNR in dB using original signal and quantized signal
origs: the original signal quants: the quantized signal *hint* : need to calculate the quantization error and plug into SN...

8 years ago

Solved


Compound interest - number e
A moneylender wants to receive his annual interest of 12% more frequently. If he receives his interest rate every six months,...

8 years ago

Solved


Permute the unique values of a vector without sorting
Given a vector A, return the matrix B, wherein each row contains a permutation of the unique values in original vector while ret...

8 years ago

Solved


'5*3' copy character 3 - five times
The input is a string. Wherever a * sign occurs in string repeat copies of character on the right hand side of * sign. The numbe...

8 years ago

Solved


Percentage profit:3
x% product is sold at r1% profit. However, our target overall profit is rt%. What is the required percentage profit to meet the ...

8 years ago

Solved


Percentage profit:5: Cumulative Interest
If a bank is giving r% yearly cumulative interest for deposit, how much profit we can get by keeping x amount of money for n mon...

8 years ago

Solved


Create Combination
Motivation: In many problems, we need to create combinations with the function nchoosek. In some cases, however, choices are lim...

8 years ago

Solved


Combinations without using nchoosek
You have to generate a matrix with all possible combinations of n elements *taken 2* at a time, *without using nchoosek(1:n,2)* ...

8 years ago

Solved


Product of two multivariate polynomials
MATLAB <https://www.mathworks.com/help/matlab/polynomials.html has a few functions> for creating and manipulating single-variabl...

8 years ago

Solved


Combination of Vectors
Return a combination of vectors x1, x2 based on y1, y2 per: x(j) = 0 if y1(j) < y2(j) x(j) = x1(j) if y1(j)...

8 years ago

Solved


area of an annulus
Given the diameter d of the inner circle of the annulus. Given length z of a chord of the outer circle of the annulus. This chor...

8 years ago

Solved


Rewrite setdiff to account for non-unique values
Setdiff(a,b) is a function that will remove all values of b from a. Sometimes, you need this function to do a little bit extra,...

8 years ago

Solved


continuous compounding
what's the present value of having 100 dollars after n years given a continuously compounded rate i ? keep only 2 decimals pleas...

8 years ago

Solved


Exponential decay
Many dynamic processes can be approximated as an exponential decay. This applies to radioactive decay, some chemical reactions, ...

8 years ago

Solved


Simple return on investment
Assume you have some money and want to invest all your money to stock market. You randomly select a stock and invest all your mo...

8 years ago

Solved


Make blocks of color
Given a (Nx3) sequence of RGB colors, I want to create a (numRowBlocks x numColBlocks x 3) image comprising (blockSize x blockSi...

8 years ago

Solved


Retirement savings
At the start of what year will you have reached or exceeded a savings goal? Parameters (all are constant scalars given in a s...

8 years ago

Solved


Project Euler: Problem 8, Find largest product in a large string of numbers
Find the greatest product of five consecutive digits in an n-digit number. 73167176531330624919225119674426574742355349194934...

8 years ago

Solved


Create a function handle that reverses the input arguments of another function handle
Given a function that takes two input arguments and returns one output, create another function handle that performs the same op...

8 years ago

Solved


Infinite precision division
Develop a function that will divide a very very large integer numerator, supplied to function as a string (e.g., '12233344445555...

8 years ago

Solved


Divide the Least Common Multiple by the Greatest Common Divisor of two numbers
Divide the Least Common Multiple by the Greatest Common Divisor of two numbers. For example, for x=12345 and y=54321, the answer...

8 years ago

Solved


bad colorimeter?
You have tested one good and one bad colorimeters with a colored solution at two path lengths of light and recorded transmittanc...

8 years ago

Solved


Assign numerical values to a structure with 1 field
The aim is to assign values to a multidimensional structure *without using for-loop or while-loop* Example with a structure ...

8 years ago

Solved


Carnot cycle
Carnot engine is considered the most efficient heat engine.When operated between two temperatures T1 and T2, the efficiency is g...

8 years ago

Solved


Good Morning :)
Just submit your solution between 05:00:00 and 10:00:00 (AM = Ante Meridiem = Before Noon). _Note : Consider Cody Server Time...

8 years ago

Solved


Repetition of matrices
*A is a bold matrix: [1 2 3; 4 5 6;7 8 9]* Given an integer 'n' , a matrix B exists such that has n copies of A in the row an...

8 years ago

Load more