Answered
Pass variable by reference to function
While I think IA's answer is the better way to do it. If you really want to do what you are talking about you can create a subcl...

13 years ago | 5

| accepted

Answered
How can I modify errorbar's get up?
It used to be so easy ... In R2011a there are 3 methods the |errorbar| function can use to create errorbars. The "default" metho...

13 years ago | 0

Answered
regular expressions resources and regular expression problem
Assuming a string |x|, [a, b] = regexp(x, '(a|d|(ee))(_)([0-9]*)', 'start', 'end') will find the start and end indices ...

13 years ago | 0

Answered
stop the function from displaying
You are missing a semicolon inside the eval eval(sprintf('%s = f;',x));

13 years ago | 0

| accepted

Answered
looking for an efficient way to activate all fprintf in the function
If you are using a function, you can overload fprintf with a nested function. function myfunction(debug) fprintf('first...

13 years ago | 3

| accepted

Answered
prevent function from displaying output
Are you trying to evaluate the function? Do you want |f()|?

13 years ago | 0

Answered
Get figure handle from different mfile and plot in GUI
You should have a read through the FAQ, especially <http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_funct...

13 years ago | 0

Answered
Saving figure to Pdf... problems with 'visible','off'
The almost universal answer to question like this is: Have you tried <http://www.mathworks.com/matlabcentral/fileexchange/23629-...

13 years ago | 0

Answered
Installation Problems with Matlab 2012a on Ubuntu
Assuming you are trying to install the student version, then this is a <http://www.mathworks.com/matlabcentral/answers/48903-err...

13 years ago | 0

Answered
take line sum of part of matrix
There are a number of ways to do this. A fully vectorized way is with cumsum, but it has a lot of extra calculations so may not ...

13 years ago | 0

| accepted

Answered
How to manually adjust the decimal point?
You could also overload |display| for class double and format short to make it display 7 digits instead of 15. Since double is t...

13 years ago | 0

Answered
How to generate a random number?
You cannot do what you want. Your example random number of 5.4321 cannot be represented exactly as a float. sprintf('%20.18...

13 years ago | 0

Answered
sum every 24 rows in a vector
I am not sure what all the code you posted has to do with anything ... If I have a 8760x1 array x = randn(8760, 1); I...

13 years ago | 3

Answered
insert element in vector
While I think this is a homework problem ... Function handles and cat are your friends insert = @(a, x, n)cat(2, x(1:n)...

13 years ago | 15

Answered
[DISCONTINUED] MATLAB Answers Wish-list #2 (and bug reports)
The close/reopen system needs a rework. I don't know how to see the reason that a question got closed. I also don't know if the ...

13 years ago | 2

Answered
error installing matlab student r2012a on clean installation of ubuntu 12.04
It looks like you are trying to install your version of MATLAB on a 64-bit version of Ubuntu. Since the student version of MATLA...

13 years ago | 0

| accepted

Answered
What is the variable 'self' in MATLAB class?
There is nothing special about the variable "self". In MATLAB many people use "obj" instead. There is something special about th...

13 years ago | 2

Answered
what does the below code mean
ALM.static_rows most likely means that ALM is a structure doc struct It could also be a custom class, but that is unlike...

13 years ago | 0

Answered
same values using randi setting seed as default
Do you want something like temp = randperm(10); heads = temp(1:4) In this way heads will always have 4 values. These va...

13 years ago | 0

Answered
create a piece of music using matlab??
There are a number of things on the FEX. For example <http://www.mathworks.com/matlabcentral/fileexchange/21262-matlab-piano FEX...

13 years ago | 1

Answered
Input parser: default argument depends on another required argument, how to do this?
This is where the UsingDefaults property of the inputParser object is useful. Assuming an inputParser object |p|, a required pro...

13 years ago | 0

| accepted

Answered
Unable to Overload Subsasgn
The documentation is pretty clear on this: "Cannot Redefine Indexing or Concatenation The use of heterogeneous arrays re...

13 years ago | 1

| accepted

Answered
Matlab keeps renaming my files in camel case
I believe that the NTFS (aka Windows) file system is case preserving and case insensitive while ext4 (aka Linux) is case preserv...

13 years ago | 0

Answered
Share your favorite snippet or utility
I have three versions of your CLC that I have as shortcuts. They all came from <http://www.mathworks.com/matlabcentral/answers/1...

13 years ago | 2

Answered
Questions about Fractions and integers?
You can test if a numeric input is an "integer" with |validateattributes| ... function TF = mytest(x) TF = false; try...

13 years ago | 0

Question


Syntax bug R2011a: x ==y
In coming up with an answer to another question I was playing around and think I found a bug in R2011a in Linux. Can anyone expl...

13 years ago | 1 answer | 5

1

answer

Answered
Setter methods for dynamic properties
What about overloading |subsasgn| classdef myClass < dynamicprops methods function obj = myClass() ...

13 years ago | 1

| accepted

Answered
Regexp question number two
You need to escape the `\` results = regexp(str, '\\n', 'split')

13 years ago | 1

| accepted

Answered
Set the Subplot Apsect Ratio Manually
I think the problem is that the default unit of an axis object is normalized and the default unit of a figure object is pixels. ...

13 years ago | 0

Answered
Set the Subplot Apsect Ratio Manually
I think what you are looking for is: set(gca, 'PlotBoxAspectRatio', [1,1,1])

13 years ago | 0

Load more