A résolu


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...

plus de 9 ans il y a

A résolu


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 ...

plus de 9 ans il y a

A résolu


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...

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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(...

plus de 10 ans il y a

A résolu


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...

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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...

plus de 10 ans il y a

A résolu


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...

plus de 10 ans il y a

A résolu


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 ...

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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...

plus de 10 ans il y a

A résolu


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....

plus de 10 ans il y a

Question


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...

plus de 10 ans il y a | 1 réponse | 0

0

réponse

A résolu


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

plus de 10 ans il y a

A résolu


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...

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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; ...

plus de 10 ans il y a

A résolu


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 ...

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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,...

plus de 10 ans il y a

A résolu


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...

plus de 10 ans il y a

A résolu


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 ...

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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 ...

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

Charger plus