Question


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

plus de 15 ans il y a | 5 réponses | 7

5

réponses

Réponse apportée
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...

plus de 15 ans il y a | 0

| A accepté

Question


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.

plus de 15 ans il y a | 3 réponses | 0

3

réponses

Réponse apportée
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"...

plus de 15 ans il y a | 4

| A accepté

Question


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.

plus de 15 ans il y a | 3 réponses | 1

3

réponses

Réponse apportée
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...

plus de 15 ans il y a | 1

| A accepté

Question


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

plus de 15 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
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,...

plus de 15 ans il y a | 25

| A accepté

Question


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

plus de 15 ans il y a | 3 réponses | 10

3

réponses

Réponse apportée
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...

plus de 15 ans il y a | 0

| A accepté

Question


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

plus de 15 ans il y a | 1 réponse | 2

1

réponse

Réponse apportée
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...

plus de 15 ans il y a | 2

| A accepté

Question


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

plus de 15 ans il y a | 2 réponses | 0

2

réponses

Réponse apportée
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 ...

plus de 15 ans il y a | 2

| A accepté

Question


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

plus de 15 ans il y a | 2 réponses | 0

2

réponses

Réponse apportée
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) ...

plus de 15 ans il y a | 0

| A accepté

Question


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

plus de 15 ans il y a | 1 réponse | 0

1

réponse

Question


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

plus de 15 ans il y a | 4 réponses | 24

4

réponses

Réponse apportée
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...

plus de 15 ans il y a | 7

| A accepté

Question


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

plus de 15 ans il y a | 2 réponses | 0

2

réponses

Réponse apportée
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...

plus de 15 ans il y a | 3

| A accepté

Question


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

plus de 15 ans il y a | 1 réponse | 1

1

réponse

Réponse apportée
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...

plus de 15 ans il y a | 1

Réponse apportée
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 ...

plus de 15 ans il y a | 3

| A accepté

Question


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

plus de 15 ans il y a | 2 réponses | 3

2

réponses

Réponse apportée
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 ...

plus de 15 ans il y a | 5

Question


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

plus de 15 ans il y a | 2 réponses | 1

2

réponses

Réponse apportée
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 ...

plus de 15 ans il y a | 0

| A accepté

Question


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

plus de 15 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
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...

plus de 15 ans il y a | 3

| A accepté

Charger plus