Solved

The length of the equal sides of an isoceles triangle is 'a'.For all the possible (integer) values of the remaining side,find the associated angles between the two equal sides.

the remaining side may have many possible values.only assume integer ones for simplicity.

1 month ago

Solved

Generate a matrix as follows

write a Function that gives like the following for a random n: n=2 ans= [ 0 1 1 0] n=6 ans= [ 0 ...

1 month ago

Solved

Array ex-OR

There are in MATLAB logical functions such as _<http://www.mathworks.co.uk/help/matlab/ref/and.html and>,_ _<http://www.math...

1 month ago

Solved

Count the peaceful queens

In a 5x5 chessboard with a queen of one color (white, say) on the perimeter, one can place 12 black queens on the board such tha...

1 month ago

Solved

Define an arithmetic sequence

Given three numbers n, a, and d, define an arithmetic sequence of n terms with a being the initial term of the sequence and d be...

1 month ago

Solved

Write script that gives matrix like the following example:)

if x=2; y=[2 1; 1 1] if x=4; y=[4 3 2 1 3 3 2 1 0 2 2 1 0 0 1 1] if x=5; y=[5 4 3 2 ...

1 month ago

Solved

Flag a convertible string

If a string is able to be entirely converted to an integer, return a "true" flag. Otherwise, return a false flag. For example: ...

1 month ago

Solved

A little bit of luck needed

This one may require a little bit of guess work, but it is possible. Hints: - The same solution might fail the tests once and ...

1 month ago

Solved

MinMax mapping

Given a matrix, map all the elements within a given interval. For example, a=[ 2 5 10] mapped in the interval [1,2] ...

1 month ago

Solved

Lista Ordenada

Dado um vetor V, verifique se o vetor está ordenado, retorne true ou false. Ordenado([1 2 3 4]) = true;

1 month ago

Solved

odd number odd sum

How many three digit numbers are there whose sum of the digits is odd?

1 month ago

Solved

Draw a X

Given an input , create a square matrix of zeros with an X of ones. Ex. n = 3 drawX(3) [ 1 0 1 0 1 0 1 0 1 ] ...

1 month ago

Solved

Absolute Value of the Product of Complex Numbers

Find the absolute value (modulus) of the product of two complex numbers given by a + bi and c + di.

1 month ago

Solved

Draw a Diamond shape in ones Matrix with '0' s

Input will be odd numbers.The task is to make a Diamond shape in a ones matrix with '0's where the matrix will be a square matri...

1 month ago

Solved

Determine whether the given number is palindrome or not.

A palindromic number (also known as a numeral palindrome or a numeric palindrome) is a number (such as 16461) that remains the s...

1 month ago

Solved

Get the n-th rand number with given seed

Given seed s, return the n-th rand number using rand(). Round the answer with 4 digits. n is a postive integer.

1 month ago

Solved

Easy Sequences 23: Hat Guessing Game!

Consider the following Game Show: Hats, with numbers written on each, were placed on the heads of the participants. Participant...

1 month ago

Solved

Remove Repetidos e Ordena

Dado um vetor A, remove todos os valores repetidos deixando apenas 1 valor, e ordene o vetor. RemoveRepetidosEOrdena([1 1 2 3])...

1 month ago

Solved

Distancia Vetores

Dados dois vetores a = (x1, y1) e b = (x2, y2). Calcule a distância entre os vetores e verifique se estão perto (distancia < 10)...

1 month ago

Solved

Determine connected components of a graph

Adjacency matrix of an undirected graph is given. Return the number of connected components in the graph.

1 month ago