Question


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

environ 6 ans il y a | 1 réponse | 0

1

réponse

Question


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

environ 6 ans il y a | 1 réponse | 0

1

réponse

Question


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

environ 6 ans il y a | 2 réponses | 0

2

réponses

Question


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

environ 6 ans il y a | 2 réponses | 0

2

réponses

Question


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?

environ 6 ans il y a | 1 réponse | 0

1

réponse

Question


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

environ 6 ans il y a | 1 réponse | 0

0

réponse

Question


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

environ 6 ans il y a | 1 réponse | 0

1

réponse

Question


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

environ 6 ans il y a | 1 réponse | 0

1

réponse

Question


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

environ 6 ans il y a | 1 réponse | 0

1

réponse

Question


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

environ 6 ans il y a | 6 réponses | 0

6

réponses

Question


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

environ 6 ans il y a | 2 réponses | 0

2

réponses

Question


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?

environ 6 ans il y a | 1 réponse | 0

1

réponse

Question


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

environ 6 ans il y a | 2 réponses | 0

2

réponses

Question


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?

environ 6 ans il y a | 2 réponses | 0

2

réponses

Question


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?

environ 6 ans il y a | 1 réponse | 0

1

réponse

Question


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?

environ 6 ans il y a | 4 réponses | 0

4

réponses

Question


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

environ 6 ans il y a | 1 réponse | 1

1

réponse

Question


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?

environ 6 ans il y a | 1 réponse | 0

1

réponse

Question


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

environ 6 ans il y a | 1 réponse | 0

0

réponse

A répondu
How to plot high resolution?
Could anyone solve this question?

environ 6 ans il y a | 0

Question


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

environ 6 ans il y a | 1 réponse | 0

0

réponse

Question


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?

environ 6 ans il y a | 1 réponse | 0

0

réponse

Question


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

environ 6 ans il y a | 1 réponse | 0

0

réponse

Question


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

environ 6 ans il y a | 1 réponse | 0

0

réponse

Question


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

environ 6 ans il y a | 1 réponse | 0

0

réponse

Question


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

environ 6 ans il y a | 2 réponses | 0

2

réponses

Question


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

environ 6 ans il y a | 4 réponses | 2

4

réponses

Question


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?

environ 6 ans il y a | 4 réponses | 1

4

réponses

Question


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

environ 6 ans il y a | 1 réponse | 0

1

réponse

Question


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

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

0

réponse

Charger plus