Community Profile

Xavier Xavier

18 total contributions since 2009

Contributions in
View by

Solved

Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

4 years ago

Solved

Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

4 years ago

Solved

Which values occur exactly three times?
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...

4 years ago

Solved

Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

4 years ago

Solved

Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

4 years ago

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

4 years ago

Solved

Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

4 years ago

Solved

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

4 years ago

Solved

Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

4 years ago

Solved

Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

4 years ago

Solved

Given a and b, return the sum a+b in c.

4 years ago

Solved

Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

4 years ago

Submitted

Range intersection
Mathematical intersection of range composed of a union of intervals

4 years ago | 11 downloads |

Responded

Re: interp1q faster alternative
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...

5 years ago | 10785 views

Responded

Re: interp1q faster alternative
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...

5 years ago | 10785 views

Responded

Re: Smoothing spline with end conditions and maximum deviation conditions
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

7 years ago | 3454 views

Responded

Re: Smoothing spline with end conditions and maximum deviation conditions
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...

7 years ago | 3454 views

Posted

Smoothing spline with end conditions and maximum deviation conditions
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...

7 years ago | 3454 views