Solved

Integer sequence - 2 : Kolakoski sequence

Get the n-th term of <https://oeis.org/A000002 Kolakoski Sequence>.

4 Monate ago

Solved

Sum of first n terms of a harmonic progression

Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

4 Monate ago

Solved

Delete the column with all 0 !

Delete the column with all 0 data in a matrix(x). e.g. input x = 1 0 0 4 5 0 7 0 ...

4 Monate ago

Solved

Binary Inversion

Given the unsigned 8-bit integer x, return the number y which is the binary inversion of x. For example if x is 5, y should b...

4 Monate ago

Solved

X plus binary inverted x

Given a n-bits number x, what is the sum of x to the binary inverted version of x? (this might be more simple than you think :-)...

4 Monate ago

Solved

MATCH THE STRINGS (2 CHAR) very easy

Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

4 Monate ago

Solved

Generate a NaN...on purpose

The goal is to create a function that will return a single "NaN" without using the nan function. I am interested to see how many...

4 Monate ago

Solved

Probability of red tulips

I hope to give you bulbs of tulip. But I do not know the color of those petals. I just know that the color is red, white or yell...

4 Monate ago

Solved

07 - Common functions and indexing 4

Define the matrix _cMat_: <<http://samle.dk/STTBDP/Assignment1_3c.png>> ( _cMat_ = 10x10 matrix where the numbers from 1 t...

4 Monate ago

Solved

07 - Common functions and indexing 5

Create the vector _lin_: <<http://samle.dk/STTBDP/Assignment1_7e.png>> (the integers from 1 to 20) Make every other val...

4 Monate ago

Solved

Determine if a four bar mechanism is of Grashof type

A four bar mechanism is composed of four links. if s is the smallest link, l the longest and p,q are the length of the other lin...

4 Monate ago

Solved

07 - Common functions and indexing 1

Define _cMat_: <<http://samle.dk/STTBDP/Assignment1_3c.png>> ( _cMat_ = 10x10 matrix where the numbers from 1 to 100 runs ...

4 Monate ago

Solved

Solve expression III

Solve expression for given vector x. Expression = (tan(2*x^2+7*x-30.25)+log(x^3-2.25))/(nthroot(sin(x^3)^2+1/5*log(x^4-2.5),3))...

4 Monate ago

Solved

Speed of light:Experiment

in 1849, Fizeau set up an experiment to measure the speed of light. The discription of this experiment can be found on wikipedi...

4 Monate ago

Solved

Replace 0 to NaN!

In given matrix A=[1 nan nan; 2 2 nan; nan nan 1]; replace NaN to 0. Use matrix A as a input.

4 Monate ago

Solved

Solve expression II

Solve given expression. alpha=0.1(-x-y-50)/(exp((-x-y-50)/10)-1) beta=5exp((-x+y-60)/20) result=alpha+beta;

4 Monate ago

Solved

Solve expression I

Solve expression (1+sin(x))/cos(x)+cos(x)/(1+sin(x)) for given vector x.

4 Monate ago

Solved

Replace all odd numbers with NaN

Replace all odd numbers in the vector or matrix with NaN. For example, if x = [1 3 4 5 8 11]; then return y = [NaN Na...

4 Monate ago

Solved

Create tangent function out of sine function only

Please don't use cosine and tangent functions

4 Monate ago

Solved

Reverse the input

Given an input (n), produce an output in the reverse order with out using string variables or string function. Example x ...

4 Monate ago

Solved

Give prime Numbers upto n

You are given a input number x; print all the prime numbers less than equal to x.

4 Monate ago