Answered
How to convert string to numeric variable in if statement
If this is exactly what you want to do then try this: Team = {'C1' 'C2' 'C3' 'C4'} for ii=1:length(Team) swit...

11 years ago | 0

Answered
Delete rows from matrix
IN the title you mention rows. In the question you mention columns. example: A1=randi(10,64, 2200); A2=randi(10,64,...

11 years ago | 0

| accepted

Answered
find the pair of the matrix
Maybe you ask for this: D = reshape([a.' circshift(a.',-1)], [], 2); D(size(a,2):size(a,2):end,:)=[]; out =[D flip...

11 years ago | 0

| accepted

Answered
Help with Matalab code in detecting sign change in a Vector
First part: C = sign(diff(A, [],2))% size(M, N-1); %1 for positive, 0 for no change, -1, for negative Second part D...

11 years ago | 1

Answered
i have 729 data points within a particular range of lat &long. how can i reduce this to 150 without changing the range of lat&long..?
I assume that you don't care about the values in between maximum and minimum A=randi(1000, 729,1); % create an random matri...

11 years ago | 0

Answered
Handling GUI axes to display images
imshow(image, 'parent',handle.axes1)

11 years ago | 2

Answered
normalize a row vector
If I understood correctly: A=1:128; B=A/sum(A); Then: sum(B) ans = 1

11 years ago | 2

Answered
generate coordinates circle,square,rectangle
% circle r=1; % radius C=[1 1]; theta=0:2*pi/360:2*pi; % the angle m=r*[cos(theta')+C(1) sin(theta')+C(2)]; % th...

11 years ago | 1

Answered
Column-wise AND operation in all column combinations of two matrices
Thank you all for your replies!!

11 years ago | 0

Question


Column-wise AND operation in all column combinations of two matrices
Given matrix a of size |MxN| and matrix b of size |MxL| I want to get a matrix C of size |M x(N*L)| which contains the column-w...

11 years ago | 4 answers | 0

4

answers

Question


Problem with regular expressions
Given the string: str='""A_3_1"": [""choice_0"", ""choice_1"", ""choice_2"", ""choice_3""], ""A_2_1"": [""choice_1"", "...

12 years ago | 1 answer | 0

1

answer

Question


Textscan File and ignoring the newline characters
How can I textscan a file and ignore newline characters?

12 years ago | 1 answer | 0

1

answer

Question


Find rows containing N zeros in a matrix
I have a matrix like: mat =[1 2 3; 0 0 3; 1 2 0; 0 0 0; 2 0 0]; To find a row full ...

12 years ago | 1 answer | 0

1

answer

Question


Remove parentheses with regexp
I have the following string: a ='0.00 (578)'; How can I use regexp to retrieve what is inside the parentheses? I have ...

12 years ago | 1 answer | 0

1

answer

Question


Use Java Classes in Matlab
I have created a small Java CelsiusConverter GUI as described in <http://docs.oracle.com/javase/tutorial/uiswing/learn/creating...

12 years ago | 0 answers | 0

0

answers

Question


Losing frames when "getdata"
In a simple user interface I want to include a capture the image from my camera. To do this I have two push button. A start butt...

12 years ago | 1 answer | 0

1

answer

Question


Timer error: Cannot start timer because it is already running.
I am trying to implement a simple timer in a GUI. It is just a figure with two buttons. I want when I press the start button to ...

12 years ago | 1 answer | 0

1

answer

Question


Overlay an image in preview video
I would like to overlay an image when I preview video. By trying this : vid = videoinput('winvideo'); preview(vid) ...

12 years ago | 2 answers | 0

2

answers

Question


Regexp: different behavior for the same type of expressions
I want to capture everything except the tokens: |name|, |'_'| and |'.iv2'| name = A7122 >> filename' ...

12 years ago | 2 answers | 0

2

answers

Question


Getting the output from a callback in main function
I have the following simple problem. I have created a gui and I would like to get the output of the callback function in main fu...

12 years ago | 2 answers | 0

2

answers

Question


Optionally create plots inside function
I have a function y=myfun(x) y=3*x; plot(x, y) If |x=[1 2 3 4 5];| then the plot will be plotted. Is there anyway...

12 years ago | 1 answer | 0

1

answer

Question


Trapz abnormal behavior. Error:Subscript indices must either be real positive integers or logicals.
When I enter: >> trapz(2,2) ans = 0 When I enter: >> trapz(2.2,2.2) Subscript indices ...

12 years ago | 2 answers | 0

2

answers

Answered
Find cases of vectors-patterns in an array
I had also this in my mind as a backup idx= [0; diff(t1'==-1)]==-1 | [diff(t1'==-1); 0]==1; a=reshape(t1(idx),2,[]) ...

12 years ago | 0

Question


Find cases of vectors-patterns in an array
I have 4 cases of vectors inside an array that I want to index. All of them have trailing -1. I would like to index such pattern...

12 years ago | 2 answers | 0

2

answers

Question


In a logical array index the area with the most TRUE values
Below I have a logical vector: t=[0 1 0 0 0 0 1 1 0 0 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 1 0]; which has 5 TRUE areas and 6...

12 years ago | 2 answers | 0

2

answers

Question


Printing to screen with fprintf. Reclaim back the printed result after clearing the screen.
Suppose I use the fprintf as follows: name='John'; height=1.8; age=27; fprintf('Name.............%s\n\n', na...

12 years ago | 1 answer | 0

1

answer

Answered
A line at maximum value of y ?
line(get(gca,'Xlim'), [max(y) max(y)],'color', 'red')

12 years ago | 1

| accepted

Question


In a logical array find how the density of TRUE values increases
Supposedly we have a logical array: t=[1 0 0 0 0 1 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0]; The...

12 years ago | 4 answers | 1

4

answers

Question


Error when running inbuild example of Simulink (R2013a) Supercapacitor Model
I am using Matlab version (R2013a). The simulink of this version contains an example with the name Supercapacitor Model. When I...

12 years ago | 1 answer | 0

1

answer

Answered
Defining the 95% of data which are around the mean value
Thank you for your answer Image Analyst. The data contain also negative values. I am not sure but I think that poses a problem ...

12 years ago | 0

Load more