已回答
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...

12 years 前 | 0

已回答
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 ....

12 years 前 | 0

已回答
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 |...

12 years 前 | 1

已回答
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...

12 years 前 | 0

| 已接受

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

12 years 前 | 1

已回答
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...

12 years 前 | 0

已回答
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...

12 years 前 | 1

提问


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

12 years 前 | 1 个回答 | 4

1

个回答

已回答
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 ...

12 years 前 | 0

已回答
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); ...

12 years 前 | 1

已回答
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...

12 years 前 | 1

已回答
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...

12 years 前 | 0

已回答
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...

12 years 前 | 1

已回答
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...

12 years 前 | 0

已回答
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 ) ...

12 years 前 | 0

| 已接受

已回答
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...

12 years 前 | 2

| 已接受

已回答
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...

12 years 前 | 1

已回答
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 ...

12 years 前 | 0

已回答
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...

12 years 前 | 0

已回答
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>

12 years 前 | 0

已回答
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(...

12 years 前 | 0

已回答
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...

12 years 前 | 1

| 已接受

已回答
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...

12 years 前 | 0

已回答
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...

12 years 前 | 0

已回答
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...

12 years 前 | 0

| 已接受

已回答
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 ...

12 years 前 | 0

已回答
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...

12 years 前 | 0

已回答
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...

12 years 前 | 8

已回答
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...

12 years 前 | 3

已回答
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...

12 years 前 | 0

加载更多