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

oltre 6 anni fa | 0

| accettato

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

oltre 6 anni fa | 0

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

oltre 6 anni fa | 0

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

oltre 6 anni fa | 0

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

oltre 6 anni fa | 0

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

oltre 6 anni fa | 0

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

oltre 6 anni fa | 3

| accettato

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

oltre 6 anni fa | 0

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

oltre 6 anni fa | 0

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

oltre 6 anni fa | 0

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

oltre 6 anni fa | 1

| accettato

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

oltre 6 anni fa | 0

| accettato

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

oltre 6 anni fa | 1

| accettato

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

oltre 6 anni fa | 1

| accettato

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

oltre 6 anni fa | 1

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

oltre 6 anni fa | 0

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

oltre 6 anni fa | 0

| accettato

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

oltre 6 anni fa | 0

| accettato

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

oltre 6 anni fa | 0

| accettato

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

oltre 6 anni fa | 2

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

oltre 6 anni fa | 0

| accettato

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

oltre 6 anni fa | 0

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

oltre 6 anni fa | 1

| accettato

Risposto
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) =...

oltre 6 anni fa | 0

| accettato

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

oltre 6 anni fa | 0

| accettato

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

oltre 6 anni fa | 0

| accettato

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

oltre 6 anni fa | 1

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

oltre 6 anni fa | 1

| accettato

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

oltre 6 anni fa | 0

| accettato

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

oltre 6 anni fa | 0

Carica altro