Respondida
how to read a .txt file in matlab ?
Suppose that your file is called data.txt You can load the data simply with load('data.txt'); which will create a variabl...

alrededor de 11 años hace | 0

Respondida
patch question? image processing
How are you creating the patch? Is it only one patch? If you want the patches to be painted, you will need to create two patc...

alrededor de 11 años hace | 0

| aceptada

Respondida
How to find the reverse of a permutation vector?
Notice that p = P * (1:4)' The same for pt, i.e. pt = P' * (1:4)' For vectors p of length N, just use: pt= P' * (...

alrededor de 11 años hace | 0

Respondida
How to supress a warning which does not have a corresponding warning ID.
Use warning('off','comm:obsolete:vxlib'); It may ask you to unlock the library first in a popup window, which you can do...

alrededor de 11 años hace | 0

Respondida
how to merge 2D and 3D plots with desired positioning
You can use *surf* as you did with the cylinder. You then might need to define the grid small enough and set the colours outside...

alrededor de 11 años hace | 0

Respondida
Selecting a subset of a larger matrix with criteria
Dear Noah, Suppose that A is your original matrix and B is the matrix you want to obtain. You could do something like this:...

alrededor de 11 años hace | 0

| aceptada

Respondida
More efficient dot product function.
Are you using the function *dot(x,y)* ? If that's so, better use x'*y (assuming that x and y are column vectors) In my...

alrededor de 11 años hace | 1

| aceptada

Respondida
Traversing Through a Vector of Different-sized Cells
Assuming that V =[20 40 10 20 5 10 30 15 25 35]; C ={ {1 2 3}; {5 2 3 1}; {3 4 2 1}; {1 ...

alrededor de 11 años hace | 1

| aceptada

Respondida
How to make loops run faster
Try this for j=days_left_in_contract-1:-1:2, counter=days_left_in_contract-j; difference=min(counter,days_left_wi...

alrededor de 11 años hace | 1

Respondida
Can anyone tell me what is the difference between scatter and plot commands in Matlab?
scatter draws points without lines connecting them whereas plot may or may not plot the lines, depending on the arguments. sc...

alrededor de 11 años hace | 6

| aceptada

Respondida
Preallocating memory for a matrix of unknown size
You can use a buffer. I mean, suppose the matrix you want is M, then create M=[]; and a vector X=zeros(xsize,2), where xsize is ...

alrededor de 11 años hace | 3

Respondida
How to solve "Index exceeds matrix dimensions" error?
At first glance, the error should appear as a consequence of the line Bdata_in = Bdata_s(1:NumBasei , :); So, I would re...

alrededor de 11 años hace | 0

Respondida
adjusting of axis X
Yes it is! First you need to make a vector b with the labels: b=arrayfun(@(x)num2str(x),a,'UniformOutput',false); Then,...

alrededor de 11 años hace | 0

| aceptada

Respondida
How to run two dependent function simultaneously?
Dear Andrea, you might consider to check the post in http://www.mathworks.com/matlabcentral/answers/2081-how-to-execute-t...

alrededor de 11 años hace | 0

Respondida
How can i graph ponits with coord and value assigned, as colour graph
The result of patch depends on the patches you define, so at least using patch, there is no other way. What you can certainly...

alrededor de 11 años hace | 0

Respondida
How can i graph ponits with coord and value assigned, as colour graph
Have you taken a look at the command *patch* ? For example patch('Vertices',V,'Faces',F,'FaceVertexCData',D,'FaceColor','in...

alrededor de 11 años hace | 0

Respondida
reading whitespace in textscan
I can only think of two options: 1) Add spaces separating the fields in the data, i.e. instead of ddmmyyyyHHMM, modify the da...

alrededor de 11 años hace | 0

Respondida
Search and delete row from cell array
Suppose that C is your cell array Cnew=C; %Just for not losing original values Cnew(cellfun(@(x)isempty(x),C(:,6)),:)=...

alrededor de 11 años hace | 1

Respondida
Changing Axis in a GUI and Saving a figure in a GUI
Dear Rhys Taus, I might be wrong, but I think the problem is that you might be rewriting the axes instead of modifying them. ...

alrededor de 11 años hace | 1

| aceptada

Respondida
What does rgb palette mean?
RGB means Red Green Blue, and rgb2gray needs an mx3 matrix because each column in that matrix represents red (first column), gre...

alrededor de 11 años hace | 0

Respondida
Multi-colored pop-up menu entries
Yes, try this: uicontrol('style','popup','string',{'<HTML><FONT COLOR="red" SIZE="10" FACE="ARIAL"><b><i>Here</i></b></HTML...

alrededor de 11 años hace | 2

| aceptada

Respondida
plotting wind direction V/S time in months (timeseries)
Suppose you have the data in a matrix A, each row representing a measurement. The day would be in the first column and the direc...

alrededor de 11 años hace | 0

Respondida
Comparing user input and dataset to select appropiate value
How about using find after conversion to numeric value of the answer? ansnum=str2num(answer(1,1)); k=find(dataset==ansnum)...

alrededor de 11 años hace | 0

| aceptada

Respondida
How to add one more column in dataset
I might not have understood your question, so please let me know if this does not answer it. Suppose that you have a dataset ...

alrededor de 11 años hace | 1

| aceptada

Respondida
pop up menu and slider....
Hopefully this helps: 1) Save the handles of the ui elements. Suppose that hpopup and hslider are the handles of the pop up m...

alrededor de 11 años hace | 0

| aceptada

Respondida
Counting numbers in a sequence while corrosponding to another sequence
You can do that using the following code A=[1 2 3 4 5 6 8 9 10 11 12 13 14]; B=[6 6 6 6 4 4 4 2 2 6 6 4 4]; C=d...

alrededor de 11 años hace | 0

| aceptada

Respondida
how to create matrix iteration
You can use while as follows while any(A) end *any*(A) assumes first that all values of A can be converted to type *l...

alrededor de 11 años hace | 0

Respondida
Use convolution (conv) for probability distribution... ?
Dear Mats Lindqvist, I've found several possible explanations, so please check if anyone results to be your case: 1) As it...

alrededor de 11 años hace | 1