Risolto


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...

quasi 12 anni fa

Risolto


Add 7
Given an input variable x, output a variable y that is 7 greater than x. Example: Input x = 1 Output y is 8 Input ...

quasi 12 anni fa

Risolto


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

quasi 12 anni fa

Risolto


Keep Only the Upper characters in a string
Keep Only the Upper characters in a string s = 'Sreeram Mohan'; output = SM;

quasi 12 anni fa

Risolto


Consecutive Powers
Return 2 numbers and 2 powers such that their difference is 1 A 4 element row vector is expected: x where x(1)^x(2) - x(...

quasi 13 anni fa

Risolto


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

quasi 13 anni fa

Risolto


Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

quasi 13 anni fa

Risolto


Power of n ?
Determine if _x_ (positive integer) is a power of _n_, return true or false accordingly.

quasi 13 anni fa

Risolto


persistant sum
There will be 9 tests for this problem. In each test you will be provided with 2 integers n=[n1,n2], where n2 is equal to t...

quasi 13 anni fa

Risolto


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

quasi 13 anni fa

Risolto


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

quasi 13 anni fa

Risolto


Check if equal
Return true if all the elements of an nD array are equal, false otherwise.

quasi 13 anni fa

Risolto


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

quasi 13 anni fa

Risolto


Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

quasi 13 anni fa

Risolto


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

quasi 13 anni fa

Domanda


Is there a replacement for depfile?
A while ago MATLAB had the function depfile that scanned a function M-file for all the external code the function called. This m...

quasi 13 anni fa | 0 risposte | 0

0

risposte

Risolto


Factorial !
Calculate the factorial of a non-negative integer without using the built in function *factorial*

circa 13 anni fa

Risolto


Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

circa 13 anni fa

Risolto


Min of a Matrix
Return the minimum value in the given matrix.

circa 13 anni fa

Risolto


Pluralization
Define function plu(n) that returns '' (an empty string) if n=1, or 's' otherwise. This is handy for displaying messages from a...

circa 13 anni fa

Risolto


Matrix to column conversion
Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

circa 13 anni fa

Risolto


03 - Matrix Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3c.png>> A 10x10 matrix where the numbers from 1 to 100 ...

circa 13 anni fa

Risolto


02 - Vector Variables 5
_eVec_ = _Hello_ ( _eVec_ is a string, which is a vector of characters )

circa 13 anni fa

Risolto


02 - Vector Variables 4
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2d.png>> (Logarithmically spaced numbers between 1 and 1...

circa 13 anni fa

Risolto


normalize group of numbers to integers
Hi guys! I have a group of 4 numbers x,y,z,w which comes from 4 integers multiplied with a common factor. [x,y,z,w] = c [i,j,k,...

circa 13 anni fa

Risolto


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

circa 13 anni fa

Risolto


02 - Vector Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of ...

circa 13 anni fa

Risolto


02 - Vector Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2b.png>>

circa 13 anni fa

Risolto


Find and replaces spaces from a input string with *
For a given input string str, find how many spaces are there in the string and replace those spaces with * e.g. str = 'this is ...

circa 13 anni fa

Risolto


01 - Scalar variables
Create the following variables: <<http://samle.dk/STTBDP/Assignment1_1.png>>

oltre 13 anni fa

Carica altro