Pregunta


Can MATLAB pass by reference?
How does MATLAB deal with this?

alrededor de 15 años hace | 5 respuestas | 7

5

respuestas

Respondida
What is the difference between MATLAB code files, pCode and MEX files?
* M-files are plain ASCII text that is interpreted at run time. Actually it is parsed once and "just-in-time" compiled, but this...

alrededor de 15 años hace | 0

| aceptada

Pregunta


What is the difference between MATLAB code files, pCode and MEX files?
I hear about all of these, but do not know how they differ.

alrededor de 15 años hace | 3 respuestas | 0

3

respuestas

Respondida
How do I dynamically generate a file name for save in MATLAB
You're probably trying fname = 'foobag'; save fname variable; To do this correctly, you need to use the "functional"...

alrededor de 15 años hace | 4

| aceptada

Pregunta


How do I dynamically generate a file name for save in MATLAB
I do not know the file name at the time of coding, only at run time.

alrededor de 15 años hace | 3 respuestas | 1

3

respuestas

Respondida
Do Boolean operators shortcut in MATLAB?
In many programming languages, boolean operators like AND and OR will stop evaluating as soon as the result is known. For instan...

alrededor de 15 años hace | 1

| aceptada

Pregunta


Do Boolean operators shortcut in MATLAB?
(true or whatever) is always true, so whatever never needs to evaluate. Does it?

alrededor de 15 años hace | 1 respuesta | 0

1

respuesta

Respondida
How do I make a series of variables A1, A2, A3, ... A10?
Please don't do this! You will find that MATLAB arrays (either numeric or cell) will let you do the same thing in a much faster,...

alrededor de 15 años hace | 25

| aceptada

Pregunta


How do I make a series of variables A1, A2, A3, ... A10?
How do I make variables like this in a loop?

alrededor de 15 años hace | 3 respuestas | 10

3

respuestas

Respondida
Is an array of structs a waste of memory?
The following example was posted to the newsgroup: I've discovered to my horror that structs take up an obscene amount of ov...

alrededor de 15 años hace | 0

| aceptada

Pregunta


Is an array of structs a waste of memory?
It seems wasteful when I look at the memory used vs data stored.

alrededor de 15 años hace | 1 respuesta | 2

1

respuesta

Respondida
How does logical indexing work?
From the Getting Started book: The logical vectors created from logical and relational operations can be used to reference s...

alrededor de 15 años hace | 2

| aceptada

Pregunta


How does logical indexing work?
Can I get a short primer on this?

alrededor de 15 años hace | 2 respuestas | 0

2

respuestas

Respondida
Why is 6*i not a complex number in my program?
You may have used a variable called "i" earlier in your program or session, thus overwriting the imaginary constant i with your ...

alrededor de 15 años hace | 2

| aceptada

Pregunta


Why is 6*i not a complex number in my program?
I though i was for imaginary in MATLAB.

alrededor de 15 años hace | 2 respuestas | 0

2

respuestas

Respondida
How do I find the local maxima of a vector?
You can use the following one-line function to determine the indices of the local maxima. function index = localmax(x) ...

alrededor de 15 años hace | 0

| aceptada

Pregunta


How do I find the local maxima of a vector?
There does not seem to be a function for this.

alrededor de 15 años hace | 1 respuesta | 0

1

respuesta

Pregunta


How do I comment out a large block of code in MATLAB?
I want to do this in an easy way.

alrededor de 15 años hace | 4 respuestas | 24

4

respuestas

Respondida
How can I detect NaN values in a matrix or vector?
By definition, NaN is not equal to any number, not even NaN itself. Therefore there are two ways to detect NaN values: % G...

alrededor de 15 años hace | 7

| aceptada

Pregunta


How can I detect NaN values in a matrix or vector?
How do I identify NaN values?

alrededor de 15 años hace | 2 respuestas | 0

2

respuestas

Respondida
Why does MATLAB only calculate to 4 significant digits?
It doesn't. It uses full double-precision floating point numbers to calculate everything. By default it only prints a few decima...

alrededor de 15 años hace | 3

| aceptada

Pregunta


Why does MATLAB only calculate to 4 significant digits?
I only see 4 significant figures: >>2/3 ans = 0.6667

alrededor de 15 años hace | 1 respuesta | 1

1

respuesta

Respondida
How can the year 2011 be expressed as the sum of consecutive primes in MATLAB 7.11 (R2010b) ?
stack = []; for i = 1:2011 if isprime(i) stack = [i stack]; end if numel(stack) > 11 s...

alrededor de 15 años hace | 1

Respondida
Why does MATLAB crash when my MEX file is linked to a lib file containing STL classes?
MATLAB mex files are compiled with Visual Studio are compiled with the '_SECURE_SCL=0' flag. This flag changes the structure of ...

alrededor de 15 años hace | 3

| aceptada

Pregunta


Why does MATLAB crash when my MEX file is linked to a lib file containing STL classes?
I have compiled a static .lib file outside of MATLAB, which contains classes/functions that use standard STL libraries. When I...

alrededor de 15 años hace | 2 respuestas | 3

2

respuestas

Respondida
Why do not I see all the ticks being displayed in my plot when I use ‘XTickLabel’ in MATLAB 7.9 (R2009b)?
There are two things which are relevant in this case XTICK and XTICKLABEL. Depending on how many XTICK you have on screen, than ...

alrededor de 15 años hace | 5

Pregunta


Why do not I see all the ticks being displayed in my plot when I use ‘XTickLabel’ in MATLAB 7.9 (R2009b)?
When I try to add ticks to the x axis of the plot, I see that not all the ticks mentioned in the ‘XTickLabel’ appear in the plot...

alrededor de 15 años hace | 2 respuestas | 1

2

respuestas

Respondida
What issues should I be aware of when working with MATLAB/Simulink on multiple operating systems?
In general, you can assume that our products are fully compatible amongst all different platforms. There are some things to ...

alrededor de 15 años hace | 0

| aceptada

Pregunta


What issues should I be aware of when working with MATLAB/Simulink on multiple operating systems?
I am working on a Windows machine, while my colleague is working on the same project with a Linux machine. I would like to know ...

alrededor de 15 años hace | 1 respuesta | 0

1

respuesta

Respondida
How do I put a waitbar in an existing figure in MATLAB 7.8 (R2009a)?
To put a waitbar in an existing figure, you must transfer all the elements of a waitbar out of the default separate figure windo...

alrededor de 15 años hace | 3

| aceptada

Cargar más