Top 10% contributor
I'm not sure about MEX, but you can read from stdin using .NET. mystdin = System.Console.In; dotNETstr=ReadToEnd(x); %also Read...
5 years ago
5 years ago
Changes default behavior of , +, - for char types.
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".
3 years ago
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...
Regardless of input, output the string 'yes'.
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN.
Find the sum of all the numbers of the input vector x.
Input x = [1 2 3 5]
Output y is 11
Input x ...
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
Try out this test problem first.
Given the variable x as your input, multiply it by two and put the result in y.
Pointers implemented in Matlab
You may not be waiting long enough for the arduino to respond. Try using pause(0.01) between the write and read statements. Or y...
6 years ago