Resuelto


Normie Function
So, I built a function and gave it a name- _Normie_. *Find the nth term of Normie function:* _f(n)= 1*f(n-1)+ 2*f(n-3)+ 3_ , *...

más de 7 años hace

Resuelto


Zigzag of square matrix
find zigzag of square matrix in one dimension array a=[1 2 3;4 5 6;7 8 9]; should return b= [1 2 4 7 5 3 6 8 9]

más de 7 años hace

Resuelto


Selecting books on MATLAB for experts and beginners (blindfolded)
* Imagine you have been blindfolded and asked to pick up any two books randomly from the table. * There are n books suitable f...

más de 7 años hace

Resuelto


Reverse the Matrix
Given a Matrix A, reverse it. Such that, last element of A becomes 1st and vice versa. for example: Input = [1 2 3;4 5 ...

más de 7 años hace

Resuelto


Return all matrix elements except elements on diagonal
Consider a given Matrix A=[a b c; d e f; g h i] then return a row vector T such that it contains all the El...

más de 7 años hace

Resuelto


New Matrix with vector addition on diagonal
consider 2 vectors x=[1 2 3] y=[4 5 6] then generate a new Matrix, where Addition of x & y will be diagonal Elements...

más de 7 años hace

Resuelto


Calculate numerical integration.
x=0:0.01:1 y=@(x)x.^2 Using given two inputs(x and y), conduct numerical integration in x. (hint: trapz)

más de 7 años hace

Resuelto


Pass the Threshold!!
Write a Matlab function that will take as input a matrix of arbitrary dimensions and a scalar threshold value, and return a vec...

más de 7 años hace

Resuelto


Find argmax of a function
You are given vectors x and y (=f(x)). Return the element of x for which f(x) is maximized.

más de 7 años hace

Resuelto


Get the combinations
Consider p,q = 2 vectors of same or different length. Get a Output Array which has all the possible combinations of Elements o...

más de 7 años hace

Resuelto


Find the Pattern
Find the pattern between input and output. Write a function that gives the correct output for any input. *Hint: magic*

más de 7 años hace

Resuelto


Numbers on 7-segment
This is a 7-segment: _ |_| |_| It's a 3-by-3 char matrix.It has made by 3 characters: '_' , '|' and ' ' (space...

más de 7 años hace

Resuelto


Raise each element to the power of its index in a matrix
In a matrix, A = [1,2;3,4] raise the power of each element like: 1^1+2^3+3^2+4^4 and add it all to produce the result 274

más de 7 años hace

Resuelto


Five Fingers
A little girl has just learnt how to count from 1 to N using the five fingers of her left hand as follows. She starts by calling...

más de 7 años hace

Resuelto


Substring Extraction
In a given string, find the substring between Start_string and End_string. You will have to include or exclude the Start_str...

más de 7 años hace

Resuelto


Sum of unique multiples of 3 and 5
If we list all the natural numbers up to 15 that are multiples of 3 or 5, we get 3, 5, 6, 9, 10, 12 and 15. The sum of these mul...

más de 7 años hace

Resuelto


Find if a given sentence is a palindrome
Given a string/character array, return true if the string is a palindrome else returns false. For example: sample_text =...

más de 7 años hace

Resuelto


Pattern Sum
Write a function which receives two single digit positive integers, (k and m) as parameters and calculates the total sum as: k...

más de 7 años hace

Resuelto


Determine the number of correct and incorrect answers
In a Multiple Choice Question Test, you are to sort out answer from 4 samples, one of them is correct answer. There are 50 quest...

más de 7 años hace

Resuelto


The maximum sum of squares (testing)
Create a function file with an input maxval to determine the maximum number of terms for the series 1^2 + 2^2 + 3^2 + ... such t...

más de 7 años hace

Resuelto


The answer to life the universe and everything
Write a function that gives the answer to life the universe and everything to every input except the input is 42. In this case t...

más de 7 años hace

Resuelto


Prime Product
My professor has given a sequence of N numbers as a1, a2, ..., aN and asked me to find the smallest possible value of ai * aj su...

más de 7 años hace

Resuelto


basic matrix operations: rotate and find sum of diagonal elements of the resultant matrix
For given input matrix a, rotate it by 90 degrees and find the sum of the diagonals. Example: Input: a = 1 ...

más de 7 años hace

Resuelto


how many of the entries are positive?
Given x= sin(linspace(0,10*pi,100)), how many of the entries are positive?

más de 7 años hace

Resuelto


Transpose the Matrix
Transpose the given matrix, e.g. x=[a b;c d] transpose of x = [a c;b d]

más de 7 años hace

Resuelto


Split bread like the Pharaohs - Egyptian fractions and greedy algorithm
How would you split 5 loaves of bread among 8 people in all fairness? Get a hint from the Pharaohs. 5/8 = 4/8 + 1/8 , i.e. each ...

casi 8 años hace

Resuelto


count upper and lower case characters
In a given input string, count and return the number of upper and lower case characters as u and l respectively. For example:...

casi 8 años hace

Resuelto


Code breaker, Part II: Operation Orthos
You have been tasked with decoding several batches of coded messages that have been intercepted. Based on previous intellig...

casi 8 años hace

Resuelto


Code breaker, Part I: Operation Phoenix
You have been tasked with decoding a set of coded messages that have been intercepted. Based on previous intelligence that ...

casi 8 años hace

Resuelto


Draw 'O' !
Given n as input, generate a n-by-n matrix 'O' using 0 and 1 . example: n=4 ans= [1 1 1 1 1 0 0 1 ...

casi 8 años hace

Cargar más