Frage


How to convert a 2D matrix to a 3D matrix without for cycles?
Suppose we have a 2D matrix (M2) and we want to create 3D matrix (M3) from it with the following definition: M3(n,k,j) = M2((k-...

mehr als 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


Is it possible to get axis size in px units if it is created in normalized units?
I have the following code: set(gcf,'units','normalized','position',[0 0 1 1]) axes('units','normalized','position',[0 0 1 1]) ...

mehr als 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to extract indices with a condition?
For example I have Y = X(X==42), but I need the indices also!

mehr als 6 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


Is it possible to do this without for cycle?
T = zeros(M,K); for k = 1:K T(Y==k,k) = 1; end

mehr als 6 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


How to get the last character pressed on the keyboard?
I dont want to wait to anything, just need to read out the last pressed key. Is it possible?

mehr als 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to pause waitbuttonpress or delete charaters in the stream?
I need to get a character with waitbuttonpress, than I have to do a pause(2), and after that I need another char, but I want to ...

mehr als 6 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


How to exit a script but not from MATLAB?
If I am in a nested loop, how to break everything and quit from the script? I've tried exit and quit, but in these cases MATLAB...

mehr als 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How many different seed is possible for rng()?
I cannot find in the description, that what is the maximum value of a seed which differs from another. And can it be zero, negat...

mehr als 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


Some questions about rbbox!
Is it possible to change the appearance of the box? For example choose line instead of dashed line? Or use filled box? Is it ...

mehr als 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to find minimal distance between elements?
I have a vector, and I would like to find the minimal distance between element values. Any element distance from any element in ...

mehr als 6 Jahre vor | 6 Antworten | 0

6

Antworten

Frage


What is the clock function?
I've already seen the help page: https://www.mathworks.com/help/simulink/slref/clock.html, but I cannot understand anything from...

mehr als 6 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


What is the difference between rnd(s) and rand('state',s)?
What is the difference, and why rand('state',sum(100*clock)) is used, and what does it mean exactly?

mehr als 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to find first occurrences of a number in the beginning of blocks of that number?
For example I have x = [1 2 2 3! 0 0 0 3! 3 3 0 1 1 3! 3 4]; And I need indices of first threes associated its block. Signed wit...

mehr als 6 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


How to extract lengths of sequences from a binary vector?
For example, I have x = [0 0 1 1 1 0 1 0 0 0 0 1 1 0]; and I need 2,3,1,1,4,2,1. Are there any simple way to get this?

mehr als 6 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


How to get mouse coordinates as inputs?
I would like to get mouse coordinates on a plot when left click is made. Is it possible with MATLAB?

mehr als 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


Is it possible to plot on fullscreen with MATLAB?
I would like to use the entire screen, without window frame, menu, etc. Just a fullscreen plot area. Is it possible?

mehr als 6 Jahre vor | 4 Antworten | 0

4

Antworten

Frage


How to put yticklabels (with ticks) on the other (right) side?
I simply tried ax.YAxisLocation = 'right'; but not working, why? And what if I want ticks on both sides, but yticklabels on the...

fast 7 Jahre vor | 1 Antwort | 1

1

Antwort

Frage


How to put more than 200000 line segments on a plot?
I realized that MATLAB cannot handle more than 200000 line segments. Is it possible to do somehow?

fast 7 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to save high resolution plots without displaying it on the screen?
I haven't found solution to use retina display with MATLAB, because the highest figure window size in pixels is far smaller than...

fast 7 Jahre vor | 0 Antworten | 0

0

Antworten

Beantwortet
How to plot high resolution?
Could anyone solve this question?

fast 7 Jahre vor | 0

Frage


How to take advantage of the retina resolution of a MacBook with MATLAB?
My retina resolution is 2880x1800 but I cannot use that with MATLAB plot. For example set(gcf,'unit','pixel','position',[0 0 144...

fast 7 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


Is it possible to save a plot figure without plotting it on the screen?
Is it possible to save a plot figure without plotting it on the screen?

fast 7 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


How to save a plot with colored background?
I use set(gcf,'color','blue'), but in the saved .png the blue background colour is not seen. Why? And how to solve this problem?...

fast 7 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


How to reset plot ratio without blinking (replotted) plots?
I use axis square, but the figure first showed on a non-squared plot that blinks and the image is rescaled. Is it possible to av...

fast 7 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


How to set sizes of the axis area exactly?
I need to set the axis area to be 1600x1200px exactly. How to do that?

fast 7 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


How to convert integer vector with the 1-of-K coding sheme into a matrix?
I have Y = [2 2 1 3 2 4 1 4 4 3]; And I need 4 x 10 matrix in which all values are zeros, except 2nd element in the 1st column,...

fast 7 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


How to search a substring in a list of strings?
I have {'xx', 'abc1', 'abc2', 'yy', 'abc100'} and I would like to search 'abc' and get back {'abc1', 'abc2', 'abc100'}. Is it po...

fast 7 Jahre vor | 4 Antworten | 2

4

Antworten

Frage


Is it possible to extract numbers from formated strings without a for cycle?
I have {'abc12', 'abc23', 'abc24', 'abc99'} and I need the vector [12,23,24,99]. How to do this without a for cycle?

fast 7 Jahre vor | 4 Antworten | 1

4

Antworten

Frage


How to collect data into a vector from this data structure?
I have A.B(i,j).C(k).D(n).E.F, and i,j,k are fixed, but n runs from 1 to N. How to collect data into a vector? I know that it is...

fast 7 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


MATLAB does not offer multinomial logistic regression with incremental methods instead of batch learning?
MATLAB does not offer multinomial logistic regression with incremental methods instead of batch learning? As I see mnrfit uses ...

fast 7 Jahre vor | 0 Antworten | 0

0

Antworten

Mehr laden