提问


running a loop and saving separate files
Hi I am running a loop and saving each file separately. The syntax I am using is for i = 1:10 RUN PROGRAM sa...

9 years 前 | 1 个回答 | 0

1

个回答

提问


making a movie from plots
I am making an animation using a loop and the pause() function, and I want to save the entire animation to make a movie. The plo...

9 years 前 | 2 个回答 | 1

2

个回答

提问


division of two matrices
I have a nx2 matrix A = [1 1; 2 1; 3 -1; 0 1]; and I have a nx1 matrix B = [1; ...

9 years 前 | 2 个回答 | 0

2

个回答

提问


indexing and performing operations in matrix
I have an nx2 matrix A. I also have an interaction matrix of A, which looks like this: interact = [1 2; ...

9 years 前 | 0 个回答 | 0

0

个回答

提问


listing/enumerating numbers
I have the following matrix, named interact: interact = [1 2; 1 3; 2 1; 2 3; ...

9 years 前 | 2 个回答 | 0

2

个回答

提问


replacing entries in matrices
I begin with a nx2 matrix (coordinate positions of n particles in a 2d plane), call this R. Initially, all the elements in R are...

9 years 前 | 1 个回答 | 0

1

个回答

提问


rearranging the ind2sub result
I used [r,c] = ind2sub(size(matrix),idx) and the result gives me something like: [r,c] = 1 1 2 1 4 1 5 1 ...

9 years 前 | 1 个回答 | 0

1

个回答

提问


indexing problem in a matrix.
I have n particles scattered in space. I measured the distances of all the particles relative to all the other particles by givi...

9 years 前 | 1 个回答 | 0

1

个回答

提问


reverse indexing with conditions
Let A = [1 2 4 6 10], I want to find the indices of the matrix for which the element less than 5. So if I say: A < 5, then i...

9 years 前 | 2 个回答 | 0

2

个回答

提问


if statements using logical operators
Let me define first that: 'distance' is a vector (1 x n) and 'f' is a scalar (1 x 1). Example: distance = [1 10 5]; f = 2. T...

9 years 前 | 1 个回答 | 0

1

个回答

提问


towards object oriented programming?
I have n particles which I want to study individually. At first, they are randomly distributed over a certain region so I can cr...

9 years 前 | 1 个回答 | 0

1

个回答

提问


assigning a vector to a function
I made a function that returns a vector as a response. I noticed that this vector is not 'stored' as I check the workspace. So I...

9 years 前 | 2 个回答 | 0

2

个回答

提问


question about x(1:n) vs x(n:1)
If we want to create a row vector with elements '20' then we can say: x(1:n) = 20. (n is a number you can specify). Why is it ...

9 years 前 | 1 个回答 | 0

1

个回答

提问


drawing a line using drawnow
I am drawing a line from a point (x_1, y_1) to a terminal point (x_2,y_2). for t=0:0.01:5 plot(x_1+(x_2-x_1)*t, y_1+(...

9 years 前 | 2 个回答 | 0

2

个回答

提问


tracing a path using plot
I want to see a line being traced on screen as the loop is running. x=0; y=0; for t=1:0.01:10 plot(x+t, y+t, 'r...

9 years 前 | 1 个回答 | 0

1

个回答

提问


how to randomly select an element in a matrix
Hi, I have a matrix for example A = [1,2,3,4,5,6]; I would like to randomly select an element in A. How do I do that? ...

9 years 前 | 1 个回答 | 0

1

个回答

提问


putting a coordinate system on a video frame
I have a video converted into many frames in matlab. Now, I want to have each frame to have a coordinate system with domain: [0,...

9 years 前 | 0 个回答 | 0

0

个回答

提问


loading a video INTO matlab
Hi, I wish to load a video into matlab and I typed: obj=VideoReader('vid1.mp4') A bunch of error messages appeared: ...

9 years 前 | 0 个回答 | 0

0

个回答

提问


Tutorial request for 2D Animation
I am new to Matlab. I have random points in the 2D plane which I can plot using scatter(x,y). Initially, it is easy to do be...

9 years 前 | 1 个回答 | 0

1

个回答

提问


appending data to scatter(x,y)
I am n random points in two dimensional space (x,y). I am using scatter(x,y) to visualize them. Now I want to take the cente...

9 years 前 | 2 个回答 | 1

2

个回答

提问


making a new coordinate system in matlab
Hello, I am trying to make a grid of cells for 'gridworld' coordinate system. I am not sure if it is freely available or I have ...

9 years 前 | 1 个回答 | 0

1

个回答

提问


storing a value as a vector
Hello, I am running an iteration which helps find the eigenvalues of a matrix. I want to store the eigenvalues in each itera...

9 years 前 | 1 个回答 | 0

1

个回答

提问


calculating or knowing the bias of a simulation
Hello, I am using Matlab to estimate a probability distribution function using histograms with a bin side of 0.05 on the int...

9 years 前 | 0 个回答 | 0

0

个回答

提问


kernel density estimation and regression (?)
Hello, I am trying to estimate the pdf of a random variable two ways: First is by making an estimation analytically (by hand...

9 years 前 | 0 个回答 | 0

0

个回答

提问


fitting a custom curve in histogram
Hello, I have a histogram plot data and I want to fit some curve that is "non-traditional". Instead of the usual normal, bet...

10 years 前 | 1 个回答 | 0

1

个回答

提问


independence in rand function
Hi, The rand function in matlab generates random numbers that are uniformly distributed. If for example, I say a = ran...

10 years 前 | 1 个回答 | 0

1

个回答

提问


plotting piecewise functions with logarithm
I am plotting a piecewise function as in below: x_axis=[-40:0.01:40]; g=5; if x_axis<0; plot(x_axis, (1/40).*lo...

10 years 前 | 2 个回答 | 0

2

个回答

提问


How is this an exponential curve?
Hello, I would like your help on the following code. How does this trace an exponential curve? N=8000; % ...

10 years 前 | 2 个回答 | 0

2

个回答

提问


histogram and plot at the same
Hello, Please help. I want to draw a plot of a function (the ones we have when we use plot()) and a histogram (with the bin...

10 years 前 | 1 个回答 | 0

1

个回答

提问


plotting many things in one window
Hi, I have X, which is a 100x100 matrix. I would like to plot each row with respect to the integers 1:100. Of course I could...

10 years 前 | 1 个回答 | 0

1

个回答

加载更多