Top 10% contributor
If I use the following mex function, seedit_mex, to set the seed each time before calling rand() in another mex functio...
Answered 4 years ago
In standard C, the following code generate 5 random numbers.
int main (int argc, char ...
Asked 4 years ago
Given two lists of numbers, determine the weighted average.
[1 2 3] and [10 15 20]
should result in
2 years ago
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...
Regardless of input, output the string 'yes'.
Find the sum of all the numbers of the input vector x.
Input x = [1 2 3 5]
Output y is 11
Input x ...
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for.
Given a and b, return the sum a+b in c.
Given the number x, y must be the summation of all integers from 1 to 2^x.
For instance if x=2 then y must be 1+2+3+4=10.
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...
Try out this test problem first.
Given the variable x as your input, multiply it by two and put the result in y.
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
BTW, I paid and used ...
Asked 4 months ago
Join the conversation