Respondida
Which code will be faster?
Loading the into memory should be faster if they fit in memory. It is easy to test the speed of both of them for yourself thoug...

alrededor de 10 años hace | 0

| aceptada

Respondida
I have an image with red,yellow and green pixels. How can I find the percentage of yellow pixels?
yellow = red == 255 & green == 255; if you are using a uint8 image or replace 255 with whatever the data maximum is otherwi...

alrededor de 10 años hace | 0

| aceptada

Respondida
uitabgroup with tabs from different .fig files
The problem is that what is defined in a .fig will always be a figure, not a panel that can simply be parented by your tab. A f...

alrededor de 10 años hace | 0

| aceptada

Respondida
Why is guidata not working for me??
The problem here is that handles is a struct and is copied by value, not updated by reference. Whenever you access handles you ...

alrededor de 10 años hace | 1

| aceptada

Respondida
how do i prompt
rowCol = input( 'Enter row and column\n' ); would work if the user inputs something like: [9 8]; Or you could split...

alrededor de 10 años hace | 1

Respondida
error C1083: Cannot open include file: 'mex.h': No such file or directory
You have to setup your include directories in Visual Studio in order for it to know where to find header files to include. This...

alrededor de 10 años hace | 0

Respondida
mwArray structure index explaination
I tend to use mxCreateStructMatrix to create a struct, but I guess your syntax works just as well, judging from the help...

alrededor de 10 años hace | 0

Respondida
GUI - 'For' loop not working correctly
Strings order alpha-numerically so anything starting with 9 will come after anything starting with 1, irrespective of whether it...

alrededor de 10 años hace | 0

Respondida
Can't get windowButtonMotionFcn to work
You need to use @obj.mouse in your call to create the figure because the function is part of your class and so needs to have the...

alrededor de 10 años hace | 2

| aceptada

Respondida
FLOPS in Complex Array Multiplication
doc timeit Put the multiplication in a function, use timeit and divide the number of floating point operations (easy to cal...

alrededor de 10 años hace | 0

Respondida
How to get the current variable value in Matlab GUI?
From what I can see at a quick glance, your handles.c is growing in the loop (i.e. it is a vector of values) and therefore so is...

alrededor de 10 años hace | 0

| aceptada

Respondida
The plot disappears if I change xlim
plot( x, y ) is the normal form of the plot function so just use that as e.g. plot( K(:,2), K(:,1) ) if you want th...

alrededor de 10 años hace | 0

Respondida
Undefined function or variable 'I'
http://uk.mathworks.com/help/matlab/creating_guis/share-data-among-callbacks.html

alrededor de 10 años hace | 0

Respondida
How to use path in a script in which another script is loaded?
Add your folders to your path and save it. You don't need to cd in code to change directories when calling a function. There...

alrededor de 10 años hace | 0

Respondida
how to fix my guide m file
Open your fig in GUIDE, double click on Axes1, find the 'CreateFcn' property, select all the text in that field and delete it. ...

alrededor de 10 años hace | 1

Respondida
How can I add several graphics to a single GUI.
All those functions take an explicit axes handle as an argument, e.g. hold( handles.axes2, 'on' ) label( handles.axes2,....

alrededor de 10 años hace | 0

| aceptada

Respondida
Can I dynamically change a structure name
Use the version of load with an output argument - i.e. loadedStruct = load( currPath ); Then you will get the contents o...

alrededor de 10 años hace | 1

| aceptada

Respondida
Extracting 'y' values from plot over an iterating loop
Well if freq and psd are 2d matrices then interp1(freq,psd,freq_10); is not going to work because interp1 expects vector...

alrededor de 10 años hace | 0

Respondida
how to sum column of matrix?
idx = bsxfun( @eq, a, t' ); percent = 100 * sum( any( idx, 2 ) ) / numel( t ); would work for your second example. ...

alrededor de 10 años hace | 0

| aceptada

Respondida
How to make a loop to the if else situation ?
idx = num2str( ceil( idxi / 5 ) ); works if you will always have 5 images in each group and continue that same logic.

más de 10 años hace | 1

| aceptada

Respondida
How can I create the following vector??
r = repmat( 30, [numel(y), 1] ); or r = 30 * ones( numel(y), 1 ); or r = 30 + zeros( numel(y), 1 ) ); I hav...

más de 10 años hace | 0

Respondida
Find coordinates of pixels from vector containing numbers of pixels
doc ind2sub

más de 10 años hace | 0

| aceptada

Respondida
basic question: how do i keep counting up numbers in a vector?
>> a = [2 3 2 3 2 3]; >> B = cumsum( a ) B = 2 5 7 10 12 15

más de 10 años hace | 0

| aceptada

Respondida
How to get DIMENSIONS of ROI using roipoly??
In your other very similar question which you seem to have abandoned you said you get a binary mask out from roipoly. You can...

más de 10 años hace | 0

Respondida
How to call a file without extension?
[pathstr,name,ext] = fileparts(filename); breaks up a filename into component parts, including the name and the extension. ...

más de 10 años hace | 0

| aceptada

Respondida
How to find pixel location using ROIPOLY???
The [BW, xi, yi] = roipoly(...) syntax for calling roipoly gives you the vertices of the polygon/roi in xi and yi. Are ...

más de 10 años hace | 0

Respondida
a GUI keeps popping out after close command
'figure2' is not defined in that scope. I assume you want to use handles.figure2 as the handle of your GUI to close.

más de 10 años hace | 0

| aceptada

Respondida
Save each image loaded by a loop
TargetImgs{k} = imread(filename); will put them in a cell array. If all your images are the same size and you intend to do...

más de 10 años hace | 0

Respondida
Problem adding components of a vector using a while loop
You should be using b = b + x(k) rather than b = b + k(x) x is your vector, k is the index into it.

más de 10 años hace | 0

| aceptada

Respondida
Is it possible to transfer a license from an old computer to a new one?
You should be able to, but it depends if your license is node-locked or user-locked. It is best to contact mathworks directly t...

más de 10 años hace | 0

| aceptada

Cargar más