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

oltre 13 anni fa | 5

| accettato

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

oltre 13 anni fa | 0

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

oltre 13 anni fa | 0

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

oltre 13 anni fa | 0

| accettato

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

oltre 13 anni fa | 3

| accettato

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

oltre 13 anni fa | 0

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

oltre 13 anni fa | 0

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

oltre 13 anni fa | 0

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

oltre 13 anni fa | 0

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

oltre 13 anni fa | 0

| accettato

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

oltre 13 anni fa | 0

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

oltre 13 anni fa | 0

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

oltre 13 anni fa | 3

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

oltre 13 anni fa | 15

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

oltre 13 anni fa | 2

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

oltre 13 anni fa | 0

| accettato

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

oltre 13 anni fa | 2

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

oltre 13 anni fa | 0

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

oltre 13 anni fa | 0

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

oltre 13 anni fa | 1

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

oltre 13 anni fa | 0

| accettato

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

oltre 13 anni fa | 1

| accettato

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

oltre 13 anni fa | 0

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

oltre 13 anni fa | 2

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

oltre 13 anni fa | 0

Domanda


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

oltre 13 anni fa | 1 risposta | 5

1

risposta

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

oltre 13 anni fa | 1

| accettato

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

oltre 13 anni fa | 1

| accettato

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

oltre 13 anni fa | 0

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

oltre 13 anni fa | 0

Carica altro