Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

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

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

Respondida
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').

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 1

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

| aceptada

Respondida
How to include variables in an expression while plotting?
In this case, you don't really need to know Nthoff, as it is only a factor, so you can plot this while setting Nthoff=1; Usua...

más de 9 años hace | 1

Cargar más