Risposto
Why is indexing vectors/matrices in MATLAB very inefficient?
The fact that different means of indexing take different amount of time is interesting, but probably not that useful to understa...

oltre 13 anni fa | 0

Risposto
Problems with matrix dividing
I have no idea what you are trying to do ... Do you want to do element wise operations? There is a difference between ^ and ....

oltre 13 anni fa | 0

Risposto
Why is indexing vectors/matrices in MATLAB very inefficient?
MATLAB is not as simple as you suggest. You were looking for the extra read and write overhead you observe with |x(1:end)| and |...

oltre 13 anni fa | 1

Risposto
change axis of a plot
There are a number of good <http://peltiertech.com/WordPress/broken-y-axis-in-excel-chart/ reasons> to avoid these breaks, and o...

oltre 13 anni fa | 0

| accettato

Risposto
Randi with string variables
Is this what you want? items = {'lapin', 'souris', 'voiture', 'saumon', 'vĂˆlo', 'table', 'cochon'}; items(randi(length(i...

oltre 13 anni fa | 1

Risposto
When plotting, how do I change properties associated with the X-axis?
I am not sure what all the parameters are that you are passing to boxplot. Does this do what you want? h = boxplot(ABC, 'la...

oltre 13 anni fa | 0

Risposto
Sorting variable names in alphabetical order
Assuming you mean the variable editor and not the workspace window, I think this is a possible bug. There seems to me no good re...

oltre 13 anni fa | 1

Domanda


Floating point accurarcy and COLON
I have just been bitten by an odd floating point comparison issue. At the heart of the issue is that I expected to get true for ...

oltre 13 anni fa | 1 risposta | 4

1

risposta

Risposto
Not enough input arguments error
The error is not in quantizer function, but rather in how you are calling it. In line 6 of whatever function you are calling is ...

oltre 13 anni fa | 0

Risposto
reshape with a huge matrix
I am not sure what you mean by your notation. Is this what you are looking for? n = 10; x = repmat(1:(118*9), 1, n); ...

oltre 13 anni fa | 1

Risposto
Spaces for readability in code
I recently found out that <http://www.mathworks.com/matlabcentral/answers/48645-syntax-bug-r2011a-x-y spacing> can matter. I gen...

oltre 13 anni fa | 1

Risposto
Is it possible to disable the debugger?
Jan has provided some links to CSSM threads about p code security <http://www.mathworks.com/matlabcentral/answers/9848#comment_2...

oltre 13 anni fa | 0

Risposto
randn not random in parfor loops
You are correct and this is a good thing and consistent with the idea that MATLAB uses the same "seed" every time it starts. Pet...

oltre 13 anni fa | 1

Risposto
A-weighting Sound Filter
Your example code is for a single period of a sine wave. The filter you design, however, rings for a period of time. You want to...

oltre 13 anni fa | 0

Risposto
working with an array pointer in a recursive function
If you want to return "void" you simply do not return anything ... function ConstrucQuadtree( A,n,QuadtreeArray,index ) ...

oltre 13 anni fa | 0

| accettato

Risposto
close a message box thru coding
You could do something like h = msgbox('please wait'); n = 0; while rand > 1e-9; n = n+1; end; delete(h); Where...

oltre 13 anni fa | 2

| accettato

Risposto
What is the difference of using ; after end?
I often add a semicolon or comma after statements like "end" where they are not strictly useful so that I can easily create sing...

oltre 13 anni fa | 1

Risposto
What causes variable editor to be blank for OOP (openvar)
This has come up a number of times on Answers. I am pretty sure the variable editor cannot handle custom classes. I would start ...

oltre 13 anni fa | 0

Risposto
Is there a shorter/smarter way to do this code
It depends what you mean by better. To me the best code is the the code that is easiest for me to maintain unless it is a time b...

oltre 13 anni fa | 0

Risposto
how do I dynamically change variable name for dataset array?
See <http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F FAQ: 3F>

oltre 13 anni fa | 0

Risposto
Suppress line number display in error message
I will try this as a new answer. Just wrap everything (or almost everything) in a try-catch... function varargout = reader(...

oltre 13 anni fa | 0

Risposto
Cell-Preallocation slows down code
Preallocating a cell array is of limited benefit since it only contains pointers to the memory locations of the elements. I thin...

oltre 13 anni fa | 1

| accettato

Risposto
Test existence of files with EXIST
I am not sure you are using EXIST how it was intended to be used. The H1 line is: _%EXIST Check if variables or functions are d...

oltre 13 anni fa | 0

Risposto
Suppress line number display in error message
In your exact use case, where you only supply an error message and no identifier, I don't think you can. If you are willing to p...

oltre 13 anni fa | 0

Risposto
Why do deep paths in \usepackage cause texmex to crash (segmentation violation)?
I can recreate your problem on R2011a Linux. I modified your MWE to be texpath{end+1} = 'C:/stys/two/three/four/five/six/se...

oltre 13 anni fa | 0

| accettato

Risposto
installation problems matlab and simulink student version R2011a
Are you running 64-bit Linux? the student version only supports 32-bit linux. There are a number of questions here about trying ...

oltre 13 anni fa | 0

Risposto
Sound output latency issue
You are not giving us much to work on ... The rate at which soundcard hardware can be rapidly and repeatedly triggered depend...

oltre 13 anni fa | 0

Risposto
Why 'str2double' is preferred over 'str2num?
In this case I think it is best to actually look at the code of the two functions type str2num type str2double One pr...

oltre 13 anni fa | 8

Risposto
systematic: Do not use global, don't use eval
There are certain things that cannot be done without EVAL (or meta programming). In general, these are hacky type things. For ex...

oltre 13 anni fa | 3

Risposto
re-formatting a matrix
First lets create some dummy data. I am intentionally creating it in a non-optimal manner depth = [0:1:20]'; data1 = ran...

oltre 13 anni fa | 0

Carica altro