Top 5% contributor
3 years ago
I managed to solved my problem with the code below. But I still don't really understand why if (i1==i9) is necessary. does anyo...
4 years ago
Hi Bruno, Your code seems great but I need something more... i would like to be able to have x a column vector sorted in ascen...
Check if sorted.
Input x = [1 2 0]
Output y is 0
2 years ago
Given the input n, return true if n is odd or false if n is even.
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if
x = [1 2...
Try out this test problem first.
Given the variable x as your input, multiply it by two and put the result in y.
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN.
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...
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
Remove the nth column from input matrix A and return the resulting matrix in output B.
A = [1 2 3; 4 5 6];
Given a and b, return the sum a+b in c.
Find the sum of all the numbers of the input vector x.
Input x = [1 2 3 5]
Output y is 11
Input x ...
Thank you guys, I think that now I have everything to solve my problem. And that's cool to have a super fast answer! Xavier
5 years ago
Thanks a lot! The options 'errorbar', 'xy','xyp',xypp' will be really usefull for my problem. But I couldn't find a way to expre...
Hello, I want to smooth a some data with a spline. So I used the function spaps but I would like to have 2 improvements. First...
5 years ago
Join the conversation