Respondida
Error using radon Expected input number 1, I, to be two-dimensional.
Your jpg file is probably an RGB image (even if it doesn't look like a color image). That makes it a 3D array. You need to deter...

más de 6 años hace | 0

| aceptada

Respondida
Sort indices to groups with all pairs sampled
It looks like <https://www.mathworks.com/help/matlab/ref/nchoosek.html nchoosek> should do the trick for you.

más de 6 años hace | 0

Respondida
Index in position 2 exceeds array bounds (must not exceed 1).????
You are trying to access x(:,2) in the second iteration of either loop. Either change that, or switch to size(x,2) in your loop ...

más de 6 años hace | 0

Respondida
Finding the distance between two points in an image
You are using R2016a, but using functions in scripts was introduced in R2016b. The documentation page you linked does not mentio...

más de 6 años hace | 0

Respondida
Creating new matrix with another matrix
Do you mean something like this? data=randi([-2 5],[50 70]); hasZeroInLastCol= data(:,end)==0; newdata=data(hasZeroInLastCol,...

más de 6 años hace | 0

Respondida
Publishing a set of functions
If by your first point you mean integration of your function in Matlab or one of the toolboxes: contact support to work out the ...

más de 6 años hace | 0

Respondida
creating a matrix from two sets of data
You can use ndgrid to generate every combination. [X, Y] =ndgrid(x, y); out=[X(:) Y(:)];

más de 6 años hace | 3

| aceptada

Respondida
How the change the intensity of the image in the App designer without loading it again and again?
This sounds like you should be able to borrow a lot of code from my WindowLevel FEX submission. The point is to change the caxes...

más de 6 años hace | 0

Respondida
Reading file delivery problem
Store the result back to your guidata struct in your first callback. You do need to make sure that clicking on the second but...

más de 6 años hace | 0

Respondida
Bar charts with different colors
Depending on your release you can set the CData property of every bar, or you will need to create separate bar objects and set t...

más de 6 años hace | 0

Respondida
How to find the row numbers of similar elements
Assuming you want a matrix with the duplicate row indices, the code below should work. It pads the columns with NaN. I slightly ...

más de 6 años hace | 1

| aceptada

Respondida
How to split numeric values and store them?
The code below should do the trick. You will also notice there are much more comments explaining what the code is attempting to ...

más de 6 años hace | 0

| aceptada

Respondida
App designer big projects
One possible solution involves two steps: Load the dictionary Reset the texts that are visible with the updated dictionary Yo...

más de 6 años hace | 1

| aceptada

Respondida
Distance between all points in array and delete the second point if it is less that certian value (Victorized)
After a few runs I think this would be equivalent to your loop version. Note that it generates a matrix of size [n n 3] in one o...

más de 6 años hace | 1

| aceptada

Respondida
Rolling all six numbers on a six sided die
At first I mis-interpreted the question, so that may have caused some confusion. What you can do is create a logical vector wit...

más de 6 años hace | 1

Respondida
Sharing information between Callback functions in GUIDE
Because hObject is the handle to your pushbutton, you need to explicitly say you want to get the content of the edit box: z...

más de 6 años hace | 0

Respondida
Read .txt and Write in matab
I suspect this is what you need: C=readfile('output.txt');%read the file to a cell array Ca=C(2618:3484);%select the lines ...

más de 6 años hace | 0

| aceptada

Respondida
How to create the combination of zeros and ones matrix in matlab?
Although I have the feeling this might be homework, I'm going to give a complete answer anyway. By a happy coincidence, this cod...

más de 6 años hace | 0

| aceptada

Respondida
No jump in in if-query even though if-statement is true
Not all decimal numbers can be stored in binary as an exact value. This float rounding error can lead to situations like this. Y...

más de 6 años hace | 0

| aceptada

Respondida
fprintf help wont show full statement
Simply pasting what you posted into my copy of Matlab gives a hint about the cause: I get a warning from m-lint (the orange squ...

más de 6 años hace | 2

Respondida
How to open several GUIs one at a time in a matlab script?
As long as your GUI functions return a handle to the figure, you can use the <https://www.mathworks.com/help/matlab/ref/uiwait.h...

más de 6 años hace | 0

| aceptada

Respondida
How can I search a cell array for all instances of a character and replace it with something else?
From your description, I suspect the simple fact that it is an asterisk doesn't actually matter. The code below will find all ce...

más de 6 años hace | 0

Respondida
Creating a function to return a string into upper and lower case
Matlab did exactly what you asked: you wrote a function with an input, but without an output. I you open this in the Matlab edit...

más de 6 años hace | 1

| aceptada

Respondida
Can't connect all the dots with a line
Store the ratio in an array: %rest of your code ratio=zeros(size(b)); for i=length(b) %rest of your code ratio(i) =...

más de 6 años hace | 0

| aceptada

Respondida
plotting the points near to origin
Your data doesn't seem to fit your plots. The code below should give you an idea of how you could do this. You could also define...

más de 6 años hace | 0

| aceptada

Respondida
how do I find the index of all values which meet a condition within an array ?
With the find function you can look up the linear indices of all non-zero elements in an array. (you can also look up row and co...

más de 6 años hace | 0

| aceptada

Respondida
How to store an image into cell arrays in a loop?
You forgot to call your function: %% Part 3 %Write function %Iterate Gaussian filtering and then subsampling 5 times for Gaus...

casi 7 años hace | 1

Respondida
Daily 3d array to monthly- dealing with alternate days in a month and leap years - How to do it?
You don't have another option than just hardcoding the number of days in a month. You can do this in a fancy way using the date ...

casi 7 años hace | 1

| aceptada

Respondida
i split the image pixels into many small matrices
The blockproc function works on distinct blocks. If you want a sliding window operation you need to use a function like nlfilter...

casi 7 años hace | 0

| aceptada

Respondida
calculating percentage change function
You should use = for an assignment and == for a comparison. Another point is that you don't need a conditional for an else, only...

casi 7 años hace | 0

Cargar más