A répondu
I need to create a 3 by 3 window and calculate mean within the window. This window is to move through the image. How can I do it?
I would take a look at the conv() and conv2() function. you would use something like [1 1 1;1 1 1;1 1 1]/9 to get mean. and the...

environ 7 ans il y a | 0

A répondu
How to make a 2D graph from text file
I can point out a few things. # if you look at M isn't that what you're trying to plot with A? as it should include both c...

environ 7 ans il y a | 0

A répondu
how to replace values of a matrix, if another matrix meet certain conditions?
i may be over simplifying it but doesn't the greater than (>) inequality just do it? A=magic(5) B=A>18

environ 7 ans il y a | 1

A répondu
Pulse train with duty cycle variable.
why not try something like this: t=0:per/1000:per-per/1000; %define period normal = zeros(1,numel(t)); normal(t<per*dut...

environ 7 ans il y a | 0

A répondu
Is there a way to remove the nested for loops from this segment of code? I'm trying to make the code generic so it can take in n-number of moment arrays.
to make it more generic you could do something like momentind = [1 1 1 1 1 1] cind = 1; while momentind(end)~=3;...

environ 7 ans il y a | 0

A répondu
save snapshot image in a variable within a loop!!
from what i see get snapshot returns a NxMx(1 for mono 3 for color) and you're trying to stuff it into a 1x1. what you should t...

environ 7 ans il y a | 0

A répondu
Reading within parentheses in MATLAB
since you've got the right idea and cellfun() is troublesome and sometimes confusing, i've coded it for you here: dumdata...

environ 7 ans il y a | 0

A répondu
problem in for loop for plotting
do you mean you're missing the first spectrum because you put the figure after the first instance of subplot? you should move f...

environ 7 ans il y a | 0

| A accepté

A répondu
Loop to generate a folder and to join files in .txt format
without generating some dummy files here is how i see your loop and joining of the two files. you'll have to modify it dependin...

environ 7 ans il y a | 0

A répondu
Finding a point best representing the centre of density
I don't quite think you need to go that far as Image Analyst suggests. if i get it you have a consumption by time by user matri...

environ 7 ans il y a | 0

A répondu
Putting information on a imshow graph
there is a function called title() x=rand(100,100);imshow(x),title('text')

environ 7 ans il y a | 0

A répondu
How to Add Linear Trendline that Considers Errorbars
so if you want to take in the span of the error bars why not take into account the error bar points: clf; x = [1 2 3]'; ...

environ 7 ans il y a | 1

A répondu
How to prevent overlapping of point values on a matlab plot?
why not put it in a legend if there are so few points points=[1 1.01;1 1]; figure,plot(points(1,1),points(1,2),'x',p...

environ 7 ans il y a | 1

| A accepté

A répondu
How I remove edge lines and add reference lines into contour plot generated with plot(array,'style','contour')?
you would do something like clf load variables plot_data = fit ([X, Y], Z, 'cubicinterp'); contourplot = plot(plot...

environ 7 ans il y a | 0

| A accepté

A répondu
Plot over an image
I would check your points. i see that b and d are swapped, but is there sufficient distances for you to see it with the image b...

environ 7 ans il y a | 1

| A accepté

A répondu
How to plot two matrices of different sizes in the same figure?
I would go with something like this %% gen 8x8 post grid figure(1),clf, surf([1:8],[1:8],zeros(8,8)),view([0 90]), ho...

environ 7 ans il y a | 0

A répondu
How to sum up specific pixel intensities in image?
you can use logical ">" to find the values greater than 120 example = magic(10); ind=find(example>50); sumintent = sum(e...

plus de 7 ans il y a | 0

A répondu
How to count data cursors and assign a fixed number to each?
you can change things around and use something like this: hfig = figure;plot(1:10,[1:10].^2) hcursor = datacursormode(hf...

presque 8 ans il y a | 0

A répondu
How to change displayed plot in a GUI with pop-up menu.
Yes.... look at the guide quick start templates. type in guide into the workspace and it'll open the quick start window. Selec...

presque 8 ans il y a | 0

| A accepté

A répondu
Create waitbar without opening new window
so... here is a quick example to create a waitbar that you can do some extra stuff by utilizing java. i'll let you figure out h...

presque 8 ans il y a | 0

A répondu
How to close editor from the command line?
you can call com.mathworks.mlservices.MLEditorServices.closeAll you can read up all about this on the <http://undocumentedmat...

presque 8 ans il y a | 3

| A accepté

A répondu
Multiple Editors in MATLAB having more than one tab.
I'm trying to work on something for the file exchange to make it simpler but having difficulty finding the time(not as simple as...

presque 8 ans il y a | 0

A répondu
How to enlarge pie chart to appear more clearly?
Here is a quick intro example of what you can do by modifying the handles of the plots. not sure what you're going for but hope...

presque 8 ans il y a | 0

A répondu
Deleting a Column from an array?
you can use the indexing of arrays to delete a column. A = 1:10; %1x10; counting from 1 to 10; to delete column 9 (ie...

environ 8 ans il y a | 1

A répondu
How to take comlex number from edit text into listbox in Matlab?
Take a look at the function regexp() <http://www.mathworks.com/help/matlab/ref/regexp.html> and with the input like the examp...

environ 8 ans il y a | 0

A répondu
Store Variables from for loop to cell array. it only stores the last run
it might be obvious but you might want to nest your for loops. cnter = 2 %create header for j = 1:size(marker,1) ...

environ 8 ans il y a | 0

A répondu
how to find subsets of different matrices
use the function ismember(). with that you can see which matrices have the most in common.

environ 8 ans il y a | 1

A répondu
Does Matlab have functionality to make a video of a moving graph and merge it with another video?
sure. here is a very quick example. my stitch is ugly but gets you where you want to go: %% lets start by gen dummy vi...

environ 8 ans il y a | 3

| A accepté

A répondu
Handle of a figure
You should rephrase your question to what are you trying to accomplish with the handle of the current figure. getframe(gcf) doe...

environ 8 ans il y a | 0

Charger plus