Gelöst


07 - Common functions and indexing 1
Define _cMat_: <<http://samle.dk/STTBDP/Assignment1_3c.png>> ( _cMat_ = 10x10 matrix where the numbers from 1 to 100 runs ...

mehr als 3 Jahre vor

Gelöst


04 - Scalar Equations 2
Define the variables a and b: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> <<http://samle.dk/STTBDP/Assignment1_4-b.png>...

mehr als 3 Jahre vor

Gelöst


Matlab Basics - y as a function of x
Write a function to calculate y as a function of x, such that y = 6x^2 + 5x - 2

mehr als 3 Jahre vor

Gelöst


Matlab Basics II - Velocity of a particle
A particle is moving in space, such that it's velocity is given by: <<http://s30.postimg.org/5rf1xtvj5/cody1.png>> write a...

mehr als 3 Jahre vor

Gelöst


Matlab Basics - Logical Tests I
Write a script to test whether a year number is for a leap year or not. eg. x = 1884 output = 1 eg. x = 3 output = 0

mehr als 3 Jahre vor

Gelöst


Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

mehr als 3 Jahre vor

Gelöst


Matlab Basics - Set unwanted parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. Example x = [1 2 3 4 5 6 7] --> ...

mehr als 3 Jahre vor

Gelöst


Resizing Matrices
Take an 4x3 matrix, and resize it to a 2x6 matrix

mehr als 3 Jahre vor

Gelöst


Replace 0 indices in array with 1's
Take a incoming vector, and replace 0's with ones

mehr als 3 Jahre vor

Gelöst


Simple Vector Addition
Take two incoming vectors and output the sum of the two vectors

mehr als 3 Jahre vor

Gelöst


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

mehr als 3 Jahre vor

Gelöst


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

mehr als 3 Jahre vor

Gelöst


Average of square wave
given positive and negative peak , calculate dc level, 50% duty cycle

mehr als 3 Jahre vor

Gelöst


Simple date to serial no. conversion
Convert a date string to a serial date number. For example if you take x='19-May-2001' then the result is 730990 x...

mehr als 3 Jahre vor

Gelöst


Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

mehr als 3 Jahre vor

Gelöst


Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

mehr als 3 Jahre vor

Gelöst


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

mehr als 3 Jahre vor

Gelöst


MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

mehr als 3 Jahre vor

Gelöst


square root
Find the square root (y) of an input (x).

mehr als 3 Jahre vor

Gelöst


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

mehr als 3 Jahre vor

Gelöst


Complex number
For complex number c=a+bi, write code that will add a and b together.

mehr als 3 Jahre vor

Gelöst


Find the sum of n squares
What is the sum of the squares of the first n integers?

mehr als 3 Jahre vor

Gelöst


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

mehr als 3 Jahre vor

Gelöst


Determine the length of a string of characters
Determine the length of a string of characters

mehr als 3 Jahre vor

Gelöst


Array of Ones
Create a 100 X 100 array of ones.

mehr als 3 Jahre vor

Gelöst


Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


Draw 'I'
Given n as input, draw a n-by-n matrix 'I' using 0 and 1. example: n=3 ans= [0 1 0 0 1 0 0 1 0] n=...

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


convert matrix to single column
given any matrix, convert it to single column

mehr als 3 Jahre vor

Mehr laden