Solved


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

9 years ago

Solved


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

9 years ago

Solved


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

9 years ago

Solved


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

9 years ago

Solved


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

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

9 years ago

Solved


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

9 years ago

Solved


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

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

9 years ago

Solved


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

9 years ago

Answered
2 for loops and store output in a matrix to create 3D plot
I'm going to assume j and k looping from 1:J and 1:K and that you have stored your result in your loop with A(i,j)=SomeCalculati...

9 years ago | 0

Answered
Failure loading desktop class.
Have you tried the solution from <https://www.mathworks.com/matlabcentral/answers/92929-why-do-i-receive-the-errors-failure-load...

9 years ago | 0

Answered
condition if command is possible or not
In this case there is probably a function that will tell you if a matrix is invertable, but there is a more general solution. Yo...

9 years ago | 0

| accepted

Answered
Averaging image array values
I hope you are aware that images in Matlab generally have the following structure: (row,column,color channel). If I were you I w...

9 years ago | 0

| accepted

Answered
Compare matrices from different programs
A = [3 4;8 9]; B = [3 6;0 4]; AreElementsEqual = A==B ;

9 years ago | 0

Answered
Windows 10 AE Compatibility
If you look at the <https://www.mathworks.com/support/sysreq.html system requirements>, there is no indication that one of the W...

9 years ago | 0

Answered
License checkout as different user
I think the best method is to contact support via the link at the top of the page ('Contact Us').

9 years ago | 0

Answered
Integration with negative support
You are aware that you are not creating a bound, but a function that says that z is either 1 or 0? And that there is a vital ...

9 years ago | 0

Answered
change to user directory
I have <http://www.mathworks.com/matlabcentral/fileexchange/61475-find-containing-folder a FEX (file exchange) submission> that ...

9 years ago | 0

| accepted

Answered
Why Index exceeds matrix dimensions. ?? I want to create matrix 3x3 kernel
Assuming r and c are the number of rows and columns of IY, your loop continues past the size of your matrix, because you are try...

9 years ago | 0

| accepted

Answered
How to measure the peaks in my plot?
[continued from comments] With true peaks I meant the larger peaks, not just every local maximum. If you use the prominence y...

9 years ago | 0

| accepted

Answered
How do I import an old .mat code, open the script and run it?
.mat files do not contain code AFAIK, so unless you saved code into something like an anonymous function, you cannot load code b...

9 years ago | 1

Answered
large textfile 27580*1102 cell
So essentially you have a tab separated file, where you only want to keep specific columns. You can read a file like this wit...

9 years ago | 0

| accepted

Answered
how can i buy matlab student suite 2016b ?
For these kinds of questions, it is usually best to directly contact the sales support at <https://in.mathworks.com/company/abou...

9 years ago | 0

Answered
selecting a random nearest neighbour cell and setting a rule to it
bwdist returns the distance to the closest non-zero point in a matrix, so we can use that function in this case. For the purpose...

9 years ago | 0

| accepted

Answered
Error in Recursion saying Output argument "y" (and maybe others) not assigned during call to "recFunc".
You need to pass on the variable y, as your code may reach the last loop without setting it. If your execution got there, it may...

9 years ago | 1

| accepted

Answered
Binary image, click on a pixel with ginput and redirect to the closest 1 in the matrix
For a bigger example, the strategy you could follow is calculate the distance from all pixels to your selected point. In my answ...

9 years ago | 0

Answered
how to do horizontal projection histogram of an image
You mean something like this? A=imread('pout.tif');%load image A=mean(A,1);%get the mean (or use sum or max) - these conv...

10 years ago | 0

| accepted

Answered
Converting 4D-double image into DICOM format
Check if this works for your data: %generate dummy data X=rand(100,100,3,14); %remap [0 1] double to the [min max] of 8 ...

10 years ago | 0

Answered
Error in ()-indexing must appear last in an index expression.
I think your problem is this: You call a function, whose result is a vector, from which you need only specific values. In Mat...

10 years ago | 0

| accepted

Load more