Respondida
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...

más de 13 años hace | 5

| aceptada

Respondida
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...

más de 13 años hace | 0

Respondida
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 ...

más de 13 años hace | 0

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

más de 13 años hace | 0

| aceptada

Respondida
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...

más de 13 años hace | 3

| aceptada

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

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 0

Respondida
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-...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 0

Respondida
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 ...

más de 13 años hace | 0

| aceptada

Respondida
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...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 3

Respondida
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)...

más de 13 años hace | 15

Respondida
[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 ...

más de 13 años hace | 2

Respondida
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...

más de 13 años hace | 0

| aceptada

Respondida
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...

más de 13 años hace | 2

Respondida
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...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 1

Respondida
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...

más de 13 años hace | 0

| aceptada

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

más de 13 años hace | 1

| aceptada

Respondida
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...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 2

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

más de 13 años hace | 0

Pregunta


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...

más de 13 años hace | 1 respuesta | 5

1

respuesta

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

más de 13 años hace | 1

| aceptada

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

más de 13 años hace | 1

| aceptada

Respondida
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. ...

más de 13 años hace | 0

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

más de 13 años hace | 0

Cargar más