Answered
New array from several arrays
out=[a;b;c]; out=out(:)'

11 years ago | 1

| accepted

Answered
fastest way to divide a matrix columns into two matrices ?
%If A is your matrix A=randi(10,5,8) % example c5=A(:,5) % the fifth column B=A(:,[1:4 6:m]) % remaining matrix

11 years ago | 1

| accepted

Answered
Why does dividing and multiplying by the same number cause a numerical error?
Read this <http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F>

11 years ago | 0

Answered
how can i split a column and create a new one??
A=[ 1 2 3 4 4 4 4 3 3 3 2 2 1] [B,ii,jj]=unique(A) out=accumarray(jj,1:numel(jj),[],@(x) {A(x)}) celldisp(out)

11 years ago | 0

Answered
How Can I write a specific Variable I have created to a .mat file ?
save filename t

11 years ago | 1

| accepted

Answered
Convert cell of strings to numbers
str = {'a' 'b' 'c' 'd' 'e' 'f'} w='c' out=find(ismember(str,w))

11 years ago | 0

Answered
How to split a string and return only decimal numbers?
myString = 'YYYY MM DD hh mm .0200 .0325 .0375 .0425 .0475 .0525 .0575 .0625 .0675'; out=regexp(myString,'\d?\.?\d+'...

11 years ago | 3

| accepted

Answered
problems writing a function
exp((abs((x+2).*(x-3))./((x+3).*(x-2))))

11 years ago | 0

| accepted

Answered
Column vector with interval
v=2:-0.1:0 v=v'

11 years ago | 2

Answered
Unfamiliar Vector Index Notation
Example V=[1 10 20 5 30 45] V(1:2:5) Check the result

11 years ago | 0

Answered
Add constant x,y corrections to array of 2 column s x 4 rows of x,y values.
A=[62.579 -80.916;53.5 20.5;-73.5 110.12;-111 -99]; xc=0.007 yc=0.001 A(:,1)=A(:,1)+xc A(:,2)=A(:,2)+yc %or better ...

11 years ago | 0

| accepted

Answered
How can I create a title with changing numbers on the output?
n=5 title=sprintf('X%d',n)

11 years ago | 0

Answered
Inverse Z-transform with negative Z-exponents
num=[1 0 0 0]; den=conv([-1 1],[-0.2 1]) g=tf(num,den,1,'variable','z^-1')

11 years ago | 1

Answered
creating and modifying a cell array
Use cellfun X=cellfun(@sin,R)

11 years ago | 0

Answered
Finding Consecutive values in array that meet specific Criteria?
a = [3 10 7 6 2 3 4 8 4 2 7 8 9 10 1 2 7] idx=[0 a>5 0] ii=strfind(idx,[0 1]); jj=strfind(idx,[1 0])-1; [b1,b2]=max(jj-ii+...

11 years ago | 1

Answered
How to display multiple images in a single figure?
Use subplot Example with two images im1=imread('pout.tif') subplot(2,1,1), imshow(im1); subplot(2,1,2), imshow(im1)

11 years ago | 0

Answered
Replace data with NaN
A(A==999999)=nan

11 years ago | 0

| accepted

Answered
Ranking matrix by rows
*EDIT* [~,jj]=sort(a,2,'descend'); [~,b]=sort(jj,2)

11 years ago | 1

| accepted

Answered
unique the string but sum the values
str={'a_nBr' [155] 'BCUT_PEOE_0' [302] 'BCUT_PEOE_3' [ 25] 'BCUT_SLOGP_3' [160] 'BCUT_SMR_1' ...

11 years ago | 0

| accepted

Answered
FAST QUESTION! How to round a variable to the first decimal number
Velocity = 6.76979593929292939392 out=round(Velocity*10)/10 Look also at help fix help ceil

11 years ago | 1

| accepted

Answered
How to copy one rgb image to another?
you can extract your image im a=im(x0:x1,y0:y1,:)

11 years ago | 0

| accepted

Answered
select random values from vector
idx1=randi(numel(R1)) idx2=randi(numel(R2)) out=[R1(idx1) R2(idx2)]

11 years ago | 0

Answered
How to plot with no line
scatter(x,y) %or plot(x,y,'o')

11 years ago | 0

Answered
Finding the maximum of a matrix with its corresponding value in another column.
M=[1 1 2 3;2 0 20 2;3 5 4 8;4 10 3 4] [max_values,idx]=max(M(:,2:4)) out=[M(idx',1) max_values']

11 years ago | 2

Answered
Compare two different set of matrix?
setdiff(b,a)

11 years ago | 0

| accepted

Answered
adding a constant to every term in a cell array
A = {[1 2 3] [4 5 6] [7 8 9]} out=cellfun(@(x) x+5,A,'un',0)

11 years ago | 1

| accepted

Answered
finding a position of a point on graph
Use ginput

11 years ago | 0

| accepted

Answered
how to extract part of the information?
n=1000 data=cell(n,1); fid = fopen('file.txt', 'r'); fgetl(fid); for k=1:n data{k} = fgetl(fid); end fclose(fid); ...

11 years ago | 0

Answered
Replacing non-alphabetic characters with numbers?
out=zeros(size(TS1)); out(regexpi(TS1,'[A-Z]','start'))=1 %OR str=['A':'Z' 'a':'z']; out=ismember(TS1,str)

11 years ago | 1

| accepted

Load more