Answered
A way to exit out of a function in the code while it is running?
if ischar( varname ) return; end

11 years ago | 1

Answered
How can i divide an image into Overlapping Blocks without using for loop?
myImage = rand(64,48); x = 1:3:64; y = 1:3:48; [X,Y] = meshgrid(x,y); subImages = arrayfun( @(x,y) myI...

11 years ago | 1

Answered
axis changing when plotting points
You should be able to do this by setting: set( hAxes, 'YLimMode', 'manual' ) ( XLimMode or ZLimMode too if required ) ...

11 years ago | 0

| accepted

Answered
2D HCA, clustergram and dendrogram
It's a while since I used the Hierarchical Clustering functionality, but isn't 'complete' linkage (used for your dendrogram) dif...

11 years ago | 0

| accepted

Answered
Figure visibility changes upon axes call
axes(ax) brings the figure containing the axes into focus so I guess that includes making it visible too. Why do you need to ...

11 years ago | 0

Answered
Call C++ function from MatLab
http://www.mathworks.co.uk/help/matlab/ref/mex.html

11 years ago | 0

Answered
Scaling axes on plot
The first graph you can simply set: ylim( [0 8e8] ); For the second graph you can just change the first value of V_PFR t...

11 years ago | 0

| accepted

Answered
how could I build my GUI with 'colormapeditor' function ?
Have you tried manually adding com.mathworks.page.cmapeditor.* to your compiled resources?

11 years ago | 0

Answered
legend color is not match
length,set,'-r' in your plot instruction will not give what you want. you should use [1 lines], [set set], '-r' ...

11 years ago | 0

Answered
add column to matrix that allows to identify series
As you have it there 'series1', etc are just variable names. I would assume you are not planning on keeping all the individual ...

11 years ago | 0

Answered
string to calculation algorithm ?
You can also create a function handle if you want, something like: s = 'x*3'; s = ['@(x)' s]; f = str2func(s); ...

11 years ago | 0

Answered
create a new matrix for every iteration of a loop
Use a cell array. Individually named variables created in a loop are not at all a good idea.

11 years ago | 0

| accepted

Answered
Remove zeros from matrix and order by each row
A_Final = sum( A, 2 )

11 years ago | 0

| accepted

Answered
can any one tell how this break function works in this loop??
The second if statement is hit at j = 1, i = 2 so locs_Qwave(1) gets appended to q and it breaks out of the loop before the firs...

11 years ago | 0

| accepted

Answered
listbox count items help
str = get( handles.listbox1, 'String' ) lc = numel( str ); If you want to see all the properties of a UI handle object s...

11 years ago | 0

| accepted

Answered
Error using zeros "Size inputs must be integers"
Floating point maths is not guaranteed to result in exact integer values. Just use the 'round' function if you need to use the ...

11 years ago | 4

| accepted

Answered
Learning Matlab at uni, need some help
X(1:8:end,:) = 254; X(:,1:8:end) = 254; would do the job rather than using a for loop.

11 years ago | 0

| accepted

Answered
Can someone talk me through making matlab use values from a popup box when I press a button?
get( handles.Read_mode, 'Value' ) should give you the index of the currently selected option in your popup list.

11 years ago | 1

| accepted

Answered
How to delete every second pixel of each row from a photo?
nCols = size( photo, 2 ); photo = photo( :, 1:2:nCols );

11 years ago | 1

Answered
Combine 2 Structures / have a nice weekend
http://www.mathworks.com/matlabcentral/answers/96973-how-can-i-concatenate-or-merge-two-structures I did something very simil...

11 years ago | 0

Answered
in gui,I want to display an image,to use it's path with an other pushbutton and then to display a result in a text edit box
Get rid of clc,clear,close all in your ImPr_Callback callback. Or at least just put close all if you want to c...

11 years ago | 1

Question


Is there a way to tell if a function is executing inside a parfor?
When I just start typing on the command line and tab to give auto-complete options I came across isinparfor This sounded...

11 years ago | 1 answer | 0

1

answer

Answered
index exceed matrix dimensions
size(x) will return a length d vector where d is the dimension of x. In your case that will be [882 2] and likewise size(...

11 years ago | 2

Answered
Error Matrix dimensions must agree
I'm not at all familiar with using the \ operator, but to my surprise it gives no error in my R2014a with a random 500*500 matri...

11 years ago | 0

Answered
Impact of functions on calculations time!
Refactoring the exact same code into functions should have next to no impact on the speed. If it does it would think it would b...

11 years ago | 0

| accepted

Answered
what is the requirement needed to Install Matlab R2007a?
I have no idea personally, but this page may help: http://www.mathworks.co.uk/support/sysreq/previous_releases.html

11 years ago | 0

| accepted

Answered
Input a variable into a plot title
title( ['just an example of ' num2str( variable ) ' that isnt working'] ) Does that work?

11 years ago | 4

Answered
Index exceeds matrix dimensions. ?
By the sounds of it you want: pixval(i) = i+ img(VarName1(i),VarName2(i),:); rather than using the full VarName1 and Var...

11 years ago | 0

| accepted

Answered
how to view the map of north america in figure window?
I don't have the mapping toolbox, but a quick look at the help page seems to show many examples of how you would do this: <ht...

11 years ago | 0

| accepted

Load more