Answered
how to create a .mat file
Use *imread* function to load images, then you can save you variables in MAT file using *save* function. MAT-files can be loaded...

11 years ago | 0

Answered
save the results of who function
You have to use quotation marks, because an argument of *who* should be string: List = who('B*')

11 years ago | 0

| accepted

Answered
Getting value from a listbox. Error: Cell contents reference from a non-cell array object.
I suppose that your listbox contains only one string. Compare two codes: 1: lb = uicontrol('Style','listbox','Position',...

11 years ago | 0

| accepted

Answered
Calculate daily average out of many files per day
Let suppose that all file names are stored in *filename* variable: d = zeros(495,595,35); for k=1:35 d(:,:,k) = imp...

11 years ago | 0

Answered
How to delete a frame after use?
<http://www.mathworks.com/help/matlab/ref/delete.html> <http://www.mathworks.com/help/matlab/ref/recycle.html>

11 years ago | 0

| accepted

Answered
what does this simulink command mean ?
* [0 100] is the time span, * [] - here you can put a option structure, which can modify simulation settings. You can change si...

11 years ago | 1

Answered
reading files and data into matlab
Enter to subfolders: *<http://www.mathworks.com/help/matlab/ref/cd.html cd>* Exit from subfolders *cd ..* Read files: *<ht...

11 years ago | 0

Answered
How can I output intermediate vaviables when using ode45 funcion?
You can use *OutputFcn* to do this. Just add options to ode45 in this way: options = odeset('OutputFcn',@myfun); [T,Y]=o...

11 years ago | 0

| accepted

Answered
How to determine the position of an integer
If the values are in the cell format use *cell2mat* function: pos = find(cell2mat(d)==3)

11 years ago | 0

Answered
unique values in array
Simply idea is to use loop: f = [1 , timing(1)]; for k=2:numel(timing) if timing(k)~=timing(k-1) ...

11 years ago | 0

| accepted

Answered
I am doing a project using structured light, I need image to be showed in 'full screen mode', how?
Have you tried this function: <http://www.mathworks.com/matlabcentral/fileexchange/23404-fullscreen-1-1> ?

11 years ago | 0

| accepted

Answered
How can I change the x-axis to log scale using boxplot?
First question: Can you write small example? Because I don't understand fully your problem. Second question: Instead of...

11 years ago | 0

Answered
Is there an implementation of Tarjan's algorithm for triconnected components of a graph in MATLAB?
<http://www.mathworks.com/help/toolbox/bioinfo/ref/graphconncomp.html GRAPHCONNCOMP> - Find strongly or weakly connected compone...

12 years ago | 0

Answered
How to open a .m file by a double-click, on Ubuntu 12.04
This might help: http://www.walkingrandomly.com/?p=300

12 years ago | 0

Answered
Adjusting the colorbar to zero value
I'm not sure if I good understand your problem, but maybe *caxis* function will be helpful: contourf(peaks+10) cmap = je...

12 years ago | 0

Answered
How can I update data for quiver plot?
I think that this is impossible for quiver plot. Try this code: [X,Y] = meshgrid(-2:.2:2); Z = X.*exp(-X.^2 - Y.^2); ...

12 years ago | 2

| accepted

Answered
I have generated a large dataset. Now I need to draw random samples from it. How can I do this?
For example: data = exp(-(-10:0.1:10).^2); idx = randperm(numel(data)); N = 20; idx = idx(1:N); plot(id...

12 years ago | 0

Answered
plotting several quadratic functions
Yes, I think that it is good idea: figure hold all x = linspace(0,1); for a=-1:1:2 plot(x,a*x.^2+1) ...

12 years ago | 0

| accepted

Answered
How to display 3D image in each layer?
Just clear unnecessary channels: I = imread('http://www.3drealms.com/zerohour/images/zhbackground.bmp'); figure r = I...

12 years ago | 1

| accepted

Answered
How can i reset axes and edittext?
So add a button and in its callback fucntion write code which clear axis and edittext field. i.e. cla(handles.axis1) ...

12 years ago | 1

| accepted

Answered
editing inside cells array
You can try this code: for i=1:size(POT1,1) for j=2:size(POT1,2) if ~isempty(POT1{i,j}) PO...

12 years ago | 1

| accepted

Answered
i want to find out area under the curve using quad command ,the curve is generated after running the programme
If you draw yourself Bode plot (see code), you receive vectors 'x' and 'y', which can be numerically integrate. [HMag, HPha...

12 years ago | 0

Answered
plot 2d color graph
In my opinion you should use the imagesc function. x = 1:10;% 10 stimulus y = 1:8;% 8 subparts z = randi(5,8,10)-1;% ...

12 years ago | 0

Answered
how can i make the isotherm plot from excel data using MATLAB
Try function *contour* or *imagesc*.

12 years ago | 0

Answered
contourlines in time format
It may be helpful to Analyze this code: Z = 5+abs(peaks)/10; [C,h] = contour(interp2(Z,4)); th = clabel(C,h); set(...

12 years ago | 0

Answered
How to create non-repetitive random integers
Try this code: N = 100; x = randperm(N); x = x(1:70)

12 years ago | 0

| accepted

Answered
calculate the distance between 2 points
The common use distance formula is the second one: d = sqrt((x(p1)-x(p2))^2+(y(p1)-y(p2))^2); <http://en.wikipedia.org/wik...

12 years ago | 0

| accepted

Answered
how to skip from one line to another?
I recommend to use *if* statement for this purpose: x = 1:10; y = x.^2; if 0 y = sqrt(y); end plot(x,y) ...

12 years ago | 0

Answered
including subject_name in variable with a loop
eval(['final_subject_' num2str(i) '= [mean1 mean2 mean3 mean4]'])

12 years ago | 0

| accepted

Answered
replacing the value
samples = [ .6 .1 .8 .2 .98 .96 .45 .4 .87 ]; genes = [1;2;10]; %A=(<=.4) A = genes(any...

12 years ago | 0

| accepted

Load more