Question


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

15 years ago | 5 answers | 7

5

answers

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

15 years ago | 0

| accepted

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.

15 years ago | 3 answers | 0

3

answers

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

15 years ago | 4

| accepted

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.

15 years ago | 3 answers | 1

3

answers

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

15 years ago | 1

| accepted

Question


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

15 years ago | 1 answer | 0

1

answer

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

15 years ago | 25

| accepted

Question


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

15 years ago | 3 answers | 10

3

answers

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

15 years ago | 0

| accepted

Question


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

15 years ago | 1 answer | 2

1

answer

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

15 years ago | 2

| accepted

Question


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

15 years ago | 2 answers | 0

2

answers

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

15 years ago | 2

| accepted

Question


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

15 years ago | 2 answers | 0

2

answers

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

15 years ago | 0

| accepted

Question


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

15 years ago | 1 answer | 0

1

answer

Question


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

15 years ago | 4 answers | 24

4

answers

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

15 years ago | 7

| accepted

Question


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

15 years ago | 2 answers | 0

2

answers

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

15 years ago | 3

| accepted

Question


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

15 years ago | 1 answer | 1

1

answer

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

15 years ago | 1

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

15 years ago | 3

| accepted

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

15 years ago | 2 answers | 3

2

answers

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

15 years ago | 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...

15 years ago | 2 answers | 1

2

answers

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

15 years ago | 0

| accepted

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

15 years ago | 1 answer | 0

1

answer

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

15 years ago | 3

| accepted

Load more