Réponse apportée

Plotting results of for loop on one graph

Replace your plot(r,z_1) with this: plot(r,z_1,'.'); hold on If you don't turn the "hold" to "on" then the figure is o...

Plotting results of for loop on one graph

Replace your plot(r,z_1) with this: plot(r,z_1,'.'); hold on If you don't turn the "hold" to "on" then the figure is o...

environ 9 ans il y a | 8

| A accepté

Réponse apportée

Multi Plot with 8 (eight) plots in figure

You need to divide the plotting space into 5 rows with 2 columns, so your first plot, for example, would read subplot(5,2,[...

Multi Plot with 8 (eight) plots in figure

You need to divide the plotting space into 5 rows with 2 columns, so your first plot, for example, would read subplot(5,2,[...

environ 9 ans il y a | 1

| A accepté

Réponse apportée

removing Non-green background from image

Try this: BW = RGB2(:,:,1); BW = uint8(imfill(BW,'holes')); leaves_only = al1; for a = 1:3 leaves_only(:,:,...

removing Non-green background from image

Try this: BW = RGB2(:,:,1); BW = uint8(imfill(BW,'holes')); leaves_only = al1; for a = 1:3 leaves_only(:,:,...

environ 9 ans il y a | 1

| A accepté

Réponse apportée

[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)

Maybe this functionality already exists and I'm not aware of it, but why isn't there a notification of some kind on my profile p...

[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)

Maybe this functionality already exists and I'm not aware of it, but why isn't there a notification of some kind on my profile p...

environ 9 ans il y a | 13

Réponse apportée

Iterating through array of structures causes "Index exceeds matrix dimension"

It is impossible for j to go larger than numel(D) unless you modify j or D within the loop (which you are doing). I believe what...

Iterating through array of structures causes "Index exceeds matrix dimension"

It is impossible for j to go larger than numel(D) unless you modify j or D within the loop (which you are doing). I believe what...

environ 9 ans il y a | 0

Réponse apportée

How to create vector

You should always include the error message. It tells you (and me) what the problem is. See if this works: vol = zeros(leng...

How to create vector

You should always include the error message. It tells you (and me) what the problem is. See if this works: vol = zeros(leng...

environ 9 ans il y a | 1

Réponse apportée

Plotting the same distribution function in two different ways return two different graphs

In your first plot, you are plotting using the following code: plot([vR(1);vR],[0 FvR],':'); In your second plot, you ar...

Plotting the same distribution function in two different ways return two different graphs

In your first plot, you are plotting using the following code: plot([vR(1);vR],[0 FvR],':'); In your second plot, you ar...

environ 9 ans il y a | 0

| A accepté

Réponse apportée

Data Set with multiple markers, how do I get the legend to display this?

Why are you including 'fitresult' in your plotting commands? See if this code does what you want: function [fitresult, gof]...

Data Set with multiple markers, how do I get the legend to display this?

Why are you including 'fitresult' in your plotting commands? See if this code does what you want: function [fitresult, gof]...

environ 9 ans il y a | 0

| A accepté

Réponse apportée

Deleting rows in a matrix

Your code produces the result you expect. You'll need to better specify your problem. You can lose the loop completely, though, ...

Deleting rows in a matrix

Your code produces the result you expect. You'll need to better specify your problem. You can lose the loop completely, though, ...

environ 9 ans il y a | 0

Réponse apportée

How to make a infinite while loop that stops on users command.

It's not the prettiest, but the simplest would be to press control+c, which halts any code that is executing. Also, this same qu...

How to make a infinite while loop that stops on users command.

It's not the prettiest, but the simplest would be to press control+c, which halts any code that is executing. Also, this same qu...

environ 9 ans il y a | 0

Réponse apportée

sort a line of the matrix and change the other lines according the line sorted

Use sortrows. a = a'; % transpose your matrix asorted = sortrows(a,1); % sort by first column (row) asorted = asorted...

sort a line of the matrix and change the other lines according the line sorted

Use sortrows. a = a'; % transpose your matrix asorted = sortrows(a,1); % sort by first column (row) asorted = asorted...

environ 9 ans il y a | 0

| A accepté

Réponse apportée

How can find the cartesian coordinates of circle in a image

First, convert the image to binary using im2bw. Then use bwboundaries to return each object boundary. The result of bwboundaries...

How can find the cartesian coordinates of circle in a image

First, convert the image to binary using im2bw. Then use bwboundaries to return each object boundary. The result of bwboundaries...

environ 9 ans il y a | 0

Réponse apportée

How do I create an Array of random binary?

M = zeros(60,96,10); for j = 1:size(M,3) rand_row_idx = randi([1 size(M,1)]); rand_col_idx = randi([1 size(M,...

How do I create an Array of random binary?

M = zeros(60,96,10); for j = 1:size(M,3) rand_row_idx = randi([1 size(M,1)]); rand_col_idx = randi([1 size(M,...

environ 9 ans il y a | 0

Réponse apportée

Can xlswrite be used to prompt the user for the file name?

This code will request user input for the name: str = input('Enter filname:','s') Then you can simply pass the _str_ var...

Can xlswrite be used to prompt the user for the file name?

This code will request user input for the name: str = input('Enter filname:','s') Then you can simply pass the _str_ var...

environ 9 ans il y a | 1

Réponse apportée

How do I plot the intersections of two functions???

I don't know if there's a built-in code for finding intersections from function objects, but you could use the <http://www.mathw...

How do I plot the intersections of two functions???

I don't know if there's a built-in code for finding intersections from function objects, but you could use the <http://www.mathw...

environ 9 ans il y a | 0

Réponse apportée

find corner points in image?

Binarize your image then use corners.m.

find corner points in image?

Binarize your image then use corners.m.

environ 9 ans il y a | 0

Réponse apportée

How to add zeros to 2 x vectors where there are no matches, to get the same length ?

Your question seems ambiguous to me, but based off my interpretation, see if this code gives you the result you're looking for: ...

How to add zeros to 2 x vectors where there are no matches, to get the same length ?

Your question seems ambiguous to me, but based off my interpretation, see if this code gives you the result you're looking for: ...

environ 9 ans il y a | 0

Réponse apportée

Why is my RGB image not displaying as expected using imshow?

The problem here is that I was expecting the wrong thing. Matlab is plotting the proper RGB values; ArcMap was automatically app...

Why is my RGB image not displaying as expected using imshow?

The problem here is that I was expecting the wrong thing. Matlab is plotting the proper RGB values; ArcMap was automatically app...

environ 9 ans il y a | 1

| A accepté

Question

Why is my RGB image not displaying as expected using imshow?

I have a Landsat "natural" image with three color bands (rgb values ranging from 0-256). When I display the image in ArcMap, it ...

environ 9 ans il y a | 2 réponses | 1

Réponse apportée

How to break out of a while loop inside a function block ?

The search function is your friend. See <https://ch.mathworks.com/matlabcentral/newsreader/view_thread/315080> for someone with ...

How to break out of a while loop inside a function block ?

The search function is your friend. See <https://ch.mathworks.com/matlabcentral/newsreader/view_thread/315080> for someone with ...

environ 9 ans il y a | 0

| A accepté

Réponse apportée

radius of my image?

For the image you provided, you could simply compute the diameter by taking the difference between the max and min y-values of...

radius of my image?

For the image you provided, you could simply compute the diameter by taking the difference between the max and min y-values of...

environ 9 ans il y a | 0

Réponse apportée

How do I eliminate the space between the subplots?My MatLab program is as follows:

You should search around before asking. There are a handful of files at the FEX that can help: http://www.mathworks.com/matlabc...

How do I eliminate the space between the subplots?My MatLab program is as follows:

You should search around before asking. There are a handful of files at the FEX that can help: http://www.mathworks.com/matlabc...

environ 9 ans il y a | 0

| A accepté

Réponse apportée

Defining RGB color in curve fitting

I don't see in the help file for fnplt that you can specify a color (though you must not be getting an error...) You could tr...

Defining RGB color in curve fitting

I don't see in the help file for fnplt that you can specify a color (though you must not be getting an error...) You could tr...

environ 9 ans il y a | 0

Réponse apportée

How can I automatically distort (transform) a binary image to match a similar one?

Tracy's suggestion below of using PIV softwares gave me an idea which, after a bit of bookkeeping coding seems to work well. ...

How can I automatically distort (transform) a binary image to match a similar one?

Tracy's suggestion below of using PIV softwares gave me an idea which, after a bit of bookkeeping coding seems to work well. ...

environ 9 ans il y a | 1

| A accepté

Réponse apportée

How do I find the first instance of consecutive numbers above a threshold in an array?

Here's one of many ways, if I understand correctly your question: thresh = 300; blah = [100 200 300 400 500 600 700 600 ...

How do I find the first instance of consecutive numbers above a threshold in an array?

Here's one of many ways, if I understand correctly your question: thresh = 300; blah = [100 200 300 400 500 600 700 600 ...

environ 9 ans il y a | 0

Réponse apportée

How to perform multiple AND operations inside the loop?

Why not just sum(abs(imsubtract(im1,im2))) which will return the number of pixels that are different between im1 and im...

How to perform multiple AND operations inside the loop?

Why not just sum(abs(imsubtract(im1,im2))) which will return the number of pixels that are different between im1 and im...

environ 9 ans il y a | 0

| A accepté

Réponse apportée

Parfor Loop Indexing, Starting at value other than 1

Why not try it and see? You already wrote the code, just insert something in place of <body> like blah(ii) = rand...

Parfor Loop Indexing, Starting at value other than 1

Why not try it and see? You already wrote the code, just insert something in place of <body> like blah(ii) = rand...

environ 9 ans il y a | 0

Réponse apportée

I'm trying to make a contour plot using discrite x,y, and z values and the examples in all the help files assume z is just a function, not the z value associated with my x and t value. The x and y values are scatered,How can I do this? Thanks, Rick

You should search before posting. The first hit of a <http://lmgtfy.com/?q=matlab+surface+x+y+z Google search> suggests tr...

I'm trying to make a contour plot using discrite x,y, and z values and the examples in all the help files assume z is just a function, not the z value associated with my x and t value. The x and y values are scatered,How can I do this? Thanks, Rick

You should search before posting. The first hit of a <http://lmgtfy.com/?q=matlab+surface+x+y+z Google search> suggests tr...

environ 9 ans il y a | 0

| A accepté

Réponse apportée

find the difference of two structure elements

Also this should work except you should use "()" instead of "_" : http://www.mathworks.com/matlabcentral/answers/46760-extractin...

find the difference of two structure elements

Also this should work except you should use "()" instead of "_" : http://www.mathworks.com/matlabcentral/answers/46760-extractin...

environ 9 ans il y a | 0

Réponse apportée

find the difference of two structure elements

Have a look at http://www.mathworks.com/matlabcentral/newsreader/view_thread/243404

find the difference of two structure elements

Have a look at http://www.mathworks.com/matlabcentral/newsreader/view_thread/243404

environ 9 ans il y a | 0