03 - Matrix Variables 6
Make _fMat_ be a 5x3 matrix of random integers with values from -3 to 3
(Hint: use *randi*)
6年弱 前
解決済み
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 ...
6年弱 前
解決済み
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>...
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...
6年弱 前
解決済み
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
6年弱 前
解決済み
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 ...
Square the input
Given a scalar or vector x, return the square of each element.
Example
x = [7 2]
answer = [49 4]
6年弱 前
解決済み
Average of square wave
given positive and negative peak , calculate dc level, 50% duty cycle
6年弱 前
解決済み
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...
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...
6年弱 前
解決済み
Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero?
Clue:
He was the first in the line ...
6年弱 前
解決済み
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'
...
6年弱 前
解決済み
square root
Find the square root (y) of an input (x).
6年弱 前
解決済み
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
6年弱 前
解決済み
Complex number
For complex number c=a+bi, write code that will add a and b together.
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 --> ...
6年弱 前
解決済み
02 - Vector Variables 5
_eVec_ = _Hello_
( _eVec_ is a string, which is a vector of characters )
6年弱 前
解決済み
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=...
6年弱 前
解決済み
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...