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

fast 7 Jahre vor | 0

| akzeptiert

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 3

| akzeptiert

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 1

| akzeptiert

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

fast 7 Jahre vor | 0

| akzeptiert

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

fast 7 Jahre vor | 1

| akzeptiert

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

fast 7 Jahre vor | 1

| akzeptiert

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

fast 7 Jahre vor | 1

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 0

| akzeptiert

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

fast 7 Jahre vor | 0

| akzeptiert

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

fast 7 Jahre vor | 0

| akzeptiert

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

fast 7 Jahre vor | 2

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

fast 7 Jahre vor | 0

| akzeptiert

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 1

| akzeptiert

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

fast 7 Jahre vor | 0

| akzeptiert

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

fast 7 Jahre vor | 0

| akzeptiert

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

fast 7 Jahre vor | 0

| akzeptiert

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

fast 7 Jahre vor | 1

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

fast 7 Jahre vor | 1

| akzeptiert

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

fast 7 Jahre vor | 0

| akzeptiert

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

fast 7 Jahre vor | 0

Mehr laden