Create sequnce 1 4 9 16 25.........
Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input
4 years ago
Solved
Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square.
...
Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1.
Examp...
4 years ago
Solved
Weighted average
Given two lists of numbers, determine the weighted average as follows
Example
[1 2 3] and [10 15 20]
should result in
33.3...
4 years ago
Solved
"mirror" matrix
Create n x 2n "mirror" matrix of this type:
Examples
For n = 2
m = [ 1 2 2 1
1 2 2 1 ]
For n = 3
m = ...
4 years ago
Solved
Remove the vowels
Remove all the vowels in the given phrase.
Example:
Input s1 = 'Jack and Jill went up the hill'
Output s2 is 'Jck nd Jll wn...
4 years ago
Solved
What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...
Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...
4 years ago
Solved
Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...