Respondida
Call a function in an m-file from a method of a handle class
If you don't pass the object in then it has to be a static function and has knowledge of the class only, not the specific object...

más de 9 años hace | 0

Respondida
Cross-Talk between handle Class Objects?
This depends entirely on what your setValue and getValue functions do, but taking a flying guess... If you declare a property...

más de 9 años hace | 0

| aceptada

Respondida
Property validation in subclass
In general I do this kind of thing via delegation from the superclass set function. Your property declaration confuses me thoug...

más de 9 años hace | 2

Respondida
functions 'hist(x)' or 'histogram(x)' ?
Which help did you look in? You should always use the help for the version you have, easiest to access via e.g. doc hist ...

más de 9 años hace | 0

| aceptada

Respondida
How do i add a title on an imshow graph?
doc title It's as easy as that really, but as I always advise people it is better if you use explicit axes handles for thin...

más de 9 años hace | 2

| aceptada

Respondida
FUNCTION (INPUTS) Problem: I am unable to use a vector of inputs of a function as a substitute of listing the inputs each by each
I don't know anything about fmincon as I have never used it, but I assume it works like any other function that takes a function...

más de 9 años hace | 0

| aceptada

Respondida
How to find peaks along a dimension in a 3d matrix
doc squeeze

más de 9 años hace | 0

| aceptada

Respondida
Index exceeds matrix dimensions
You are indexing into an array of 240 elements in the first case, 300 elements in the second case. You haven't told us what i...

más de 9 años hace | 0

| aceptada

Respondida
Adding values in an array within limits
B = zeros( size( A ) ); validIdx = cumsum( A ) <= 9; B( validIdx ) = A( validIdx ); B( nnz( validIdx ) + 1 ) = 9 ...

más de 9 años hace | 1

| aceptada

Respondida
Q. How to get the iteration number at which the problem has been converged?
Just add in an if bestExpectedProfit == 100 break end and then it will be the iteration you want after the loop...

más de 9 años hace | 0

Respondida
when i used im2bw function in gui it is displayed as red and blue insted of black and white.Why is it so?
imagesc applies a colourmap, as explained in doc imagesc You can use imshow or you can set the colourmap to greyscale or j...

más de 9 años hace | 0

Respondida
Reverse y axis order
set( hAxes, 'YDir', 'reverse' ) should do this for an axes hAxes.

más de 9 años hace | 0

| aceptada

Respondida
How to set value of EditText to double variable in matlab
str2double( get(handles.EditText , 'String') )

más de 9 años hace | 0

Respondida
make while loop into vector so I can save as .mat file
Replace fprintf('January %d\n',i); with result{i} = sprintf('January %d\n',i); and the same for all the others,...

más de 9 años hace | 1

| aceptada

Respondida
Plot Error: Vectors should be the same length
You seem to keep reusing 'x'. I see 3 different places where it is redefined. The final one seems to make it a vector of lengt...

más de 9 años hace | 0

Respondida
GUI issues -> 1) memory: assignin, getappdata/setappdata and handles 2) best programming practices
vals = getappdata(obj); returns all data stored with a given graphics object. Personally I attach things to the handles ...

más de 9 años hace | 0

Respondida
How to Make All Children of a Figure Invisible?
You could store them all in an array and then you can just use set( hGraphics, 'Visible', 'off' ) Certainly your axes wo...

más de 9 años hace | 1

| aceptada

Respondida
Different class definitions for value classes and a handle classes?
classdef MyClass < handle is the obvious difference, but also your methods which make changes to the object of the class mu...

más de 9 años hace | 0

| aceptada

Respondida
In a contour plot, manipulate colors of contours
That's a few questions in one, but I'll try to answer them all even if some are less satisfactory than others. The colour of ...

más de 9 años hace | 0

Respondida
Can I associate one vector with another one?
There is no automatic way of doing this, you would have to apply to same swap indices yourself. If you merge them into a sing...

más de 9 años hace | 0

Respondida
How can I put data into a Cell
for n = 1:numNames Name{n} = getYourNameFromSomewhere( n ); end Doing it in a loop implies your names are somewher...

más de 9 años hace | 0

Respondida
GUI Call back Function Error!
What version of Matlab are you using? I'm guessing you are not in the latest and your main file is a script which does not al...

más de 9 años hace | 0

| aceptada

Respondida
why this message( Not enough input arguments.)
At a wild guess you are just clicking the big green 'Run' button to run your code. Your function takes an argument though so ...

más de 9 años hace | 1

Respondida
Error Using GUI after first time - "Error using handle.handle/set Invalid or deleted object."
This line: handles.nfiles=nfiles; will overwrite what I assume started off as a uicontrol the first time you run the cod...

más de 9 años hace | 0

| aceptada

Respondida
How to use multiple equal signs?
a == b && b == c

más de 9 años hace | 2

Respondida
Upgrade from Matlab 2015b to 2017a
No

más de 9 años hace | 1

Respondida
Usage of validateattributes with 'nonzero'
Which version of Matlab are you using? In R2017b: >> validateattributes( [0 0 1], { 'numeric' }, { 'nonzero' } ) Expect...

más de 9 años hace | 0

Respondida
Error while Debugging the code as : InvalidPropertyThere is no SelectionChangeFcn property on the TabGroup class.
A look at the documentation together with the error message should make this obvious though I have also had a blind spot at time...

más de 9 años hace | 0

| aceptada

Respondida
Changeing the x Values when you plot the values
plot( n, s ); as shown clearly in doc plot except that 100:10:500 is 41 values rather than 40.

más de 9 años hace | 1

| aceptada

Cargar más