Solved


Is it prime?
Given a number, check whether it is prime or not. If prime output is true, otherwise false.

3 years ago

Solved


wait for me
wait exactly x seconds please, need not be more than 2 seconds but must be accurate within say 50 milliseconds, your function mu...

3 years ago

Solved


Generate one sample of uniform random numbers between -pi and +pi
Generate one sample of uniform random numbers between -pi and +pi.

3 years ago

Solved


Person of interest?
given a person_of_interest, what is his_name?

3 years ago

Solved


0<=x<=pi?
Check whether the given angle is between zero and pi. Return logical true or false.

3 years ago

Solved


Volume of a sphere given its surface area
You just measured its surface area, that is the input.

3 years ago

Solved


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

3 years ago

Solved


Acid and water
&#9878; &#9878; &#9878; &#9878; &#9878; &#9878; &#9878; &#9878; Assume that there is a 100 liter tank. It is initially fi...

3 years ago

Solved


Test
Answer the question and the correct answer write in vector. Only one answer is correct. 1a Yes 1b No 1c No 1d No ...

3 years ago

Solved


Test of Quiz
Answer the questions and write in vector. Only one answer is correct. The founder of fuzzy logic is 1a) D. Golberg 1b)...

3 years ago

Solved


Nearest
*Description* Find the value and index of the element in vector _x_ that is nearest to value _y_. _y_ should be able to be a ...

3 years ago

Solved


middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

3 years ago

Solved


Back to basics 20 - singleton dimensions
Covering some basic topics I haven't seen elsewhere on Cody. Remove the singleton dimensions from the input variable (e.g. if...

3 years ago

Solved


Find difference of two set as per example
Find difference of two set as per example Say x=[1:5] and y=[2:6] then, set_diff(x,y) should give output[1] and set_diff(y...

3 years ago

Solved


create a circulant matrix
create a circulant matrix

3 years ago

Solved


ZigZag matrix with reflected format
ZigZag MATRIX with REFLECTED format. We have only input x. We have to create a matrix in the following pattern. input n=5...

3 years ago

Solved


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

3 years ago

Solved


sparse_matrix
You convert a vector to a sparse matrix. for example *x* =[1 2 3]; output will be *y* = [1 0 0 ...

3 years ago

Solved


Find out Harmonic mean.
Find out Harmonic mean.

3 years ago

Solved


find whether it is prime or not
For a given number find if its prime

3 years ago

Solved


the number of inputs
Find the number of the inputs of the function. example y = theinputnumber(x,k); function called theinputnumber has 2 in...

3 years ago

Solved


first element of matrix
find the first elements of a column matrix

3 years ago

Solved


Reshape a Vector
Write a function that accept three inputs. The first one is a row vector S. The second and third arguments are m and n which de...

3 years ago

Solved


Remove NaNs and numbers adjacent to NaNs
The aim is to remove the elements before and after NaN occurrences inside a vector. For example: x = [6 10 5 8 9 NaN 23 1...

3 years ago

Solved


Find Index of maximum Value and maximum Value of a vector
Find the Index of the first occurrence of the maximum value in a vector and also the maximum value in the vector. Example: [...

3 years ago

Solved


Add one raw in given matrix as shown in example
*Add one raw in given matrix as shown in example* A=[1 0;0 1]; X=[3 5]; Answer must be:[1 0; 0 1;3 5]

3 years ago

Solved


Cos Function
x is the abscissa. find the absolute value of cosine of -x and the same value with changed sign.

3 years ago

Solved


Solve Linear equations
Solve Linear equations Example: x+y=2 and x+2y=3, then x and y equal to 1.

3 years ago

Solved


Matlab Basics II - Log and natural log
Write a function that calculates the difference between the log and natural log of a vector, to two decimal places example: ...

3 years ago

Solved


create a square matrix
create a [n*n] matrix. example: mat(4)= [ 1 4 9 16 4 4 9 16 9 9 ...

3 years ago

Load more