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

nästan 6 år ago | 1 answer | 0

1

answer

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

ungefär 6 år ago | 1 answer | 0

1

answer

Question


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

ungefär 6 år ago | 2 answers | 0

2

answers

Question


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

ungefär 6 år ago | 2 answers | 0

2

answers

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?

ungefär 6 år ago | 1 answer | 0

1

answer

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

ungefär 6 år ago | 0 answers | 0

0

answers

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

ungefär 6 år ago | 1 answer | 0

1

answer

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

ungefär 6 år ago | 1 answer | 0

1

answer

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

ungefär 6 år ago | 1 answer | 0

1

answer

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

ungefär 6 år ago | 6 answers | 0

6

answers

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

ungefär 6 år ago | 2 answers | 0

2

answers

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?

ungefär 6 år ago | 1 answer | 0

1

answer

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

ungefär 6 år ago | 2 answers | 0

2

answers

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?

ungefär 6 år ago | 2 answers | 0

2

answers

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?

ungefär 6 år ago | 1 answer | 0

1

answer

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?

ungefär 6 år ago | 4 answers | 0

4

answers

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

ungefär 6 år ago | 1 answer | 1

1

answer

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?

ungefär 6 år ago | 1 answer | 0

1

answer

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

ungefär 6 år ago | 0 answers | 0

0

answers

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

ungefär 6 år ago | 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...

ungefär 6 år ago | 0 answers | 0

0

answers

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?

ungefär 6 år ago | 0 answers | 0

0

answers

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

ungefär 6 år ago | 0 answers | 0

0

answers

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

ungefär 6 år ago | 0 answers | 0

0

answers

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?

ungefär 6 år ago | 0 answers | 0

0

answers

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

ungefär 6 år ago | 2 answers | 0

2

answers

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

ungefär 6 år ago | 4 answers | 2

4

answers

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?

ungefär 6 år ago | 4 answers | 1

4

answers

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

ungefär 6 år ago | 1 answer | 0

1

answer

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

ungefär 6 år ago | 0 answers | 0

0

answers

Load more