Réponse apportée
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...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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.

plus de 6 ans il y a | 0

Réponse apportée
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 ...

plus de 6 ans il y a | 0

Réponse apportée
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...

plus de 6 ans il y a | 0

Réponse apportée
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,...

plus de 6 ans il y a | 0

Réponse apportée
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 ...

plus de 6 ans il y a | 0

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

plus de 6 ans il y a | 3

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 0

Réponse apportée
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...

plus de 6 ans il y a | 0

Réponse apportée
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...

plus de 6 ans il y a | 0

Réponse apportée
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 ...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
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 ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
App designer big projects
One possible solution involves two steps: Load the dictionary Reset the texts that are visible with the updated dictionary Yo...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 1

Réponse apportée
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...

plus de 6 ans il y a | 0

Réponse apportée
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 ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 2

Réponse apportée
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...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 0

Réponse apportée
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...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
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) =...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 1

Réponse apportée
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 ...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 0

Charger plus