Answered
How to create a function to plot cells in cell array?
You can use a for loop

11 years ago | 0

Answered
how to perform logical operation between 2 vectors of different length??
m = [1 1 1 1 0 0 0 ] x = [1 0 1 1 1 1 1 0 0 0 1 1 0 0 0] y=bsxfun(@and,m',x)

11 years ago | 0

Answered
using cellfun to convert text to double and vice-versa, help¡¡¡¡
id={'ARAU'; 'BUCA'}; %original data input name2=cellfun(@double,id,'uniformoutput',0) out=cellfun(@char ,name2,'un',0)

11 years ago | 0

| accepted

Answered
How to use max function in cell arrays or structures?
v={rand(7,2),rand(7,2),rand(7,2)} a=cell2mat(v) out=max(a(:))

11 years ago | 1

Answered
How do I find non zero cells in a cell array?
a={1 1 0 0 1;0 0 1 1 1} [row,col]=find(cell2mat(a)) out=[row col]

11 years ago | 2

Answered
How to merge variables and keeping the highest value only?
c=max(A,B)

11 years ago | 0

| accepted

Answered
equal of some arrays two vector
a=[1;2;3;4;6]; b=[0;2;3;5;6] idx=find(a==b)

11 years ago | 0

| accepted

Answered
for loop with an exclusion
Why |1:n_datafiles| ? it's just |n_datafiles| n_datafiles = [1, 2, 3, 4, 6, 7, 8]; for i_datafile =n_datafiles %my co...

11 years ago | 0

| accepted

Answered
write a for loop to round up vector
you forget to use vec(i) instead of vec vec = [1.111 2.222 3.222 4.222]; for i=1:length(vec) fprintf('Element %d is %...

11 years ago | 0

| accepted

Answered
How to union columns in the same Variable (Array) ?
They are already in the same variable, but if you mean how to reshape for example the variable x out=x(:)

11 years ago | 0

Answered
sum the series in matlab
p=3; c=3; r=4; syms v M= (r^c/factorial(c)*(1-p)+symsum(r^v/factorial(v),v, [v, c-1])^(-1))

11 years ago | 0

Answered
joining two columns in a way of row by row
A=[1;2;3;4;5] B = [6;7;8;9;10] C=[A B]' C=C(:) % or C=reshape([A B]',[],1)

11 years ago | 1

| accepted

Answered
How to store results of a FOR loop to plot later?
ww=1:10; for w = ww sim('massspringdamper') maxA = -inf; for T=98:0.1:100 sim('masssprin...

11 years ago | 0

| accepted

Answered
removing saturday and sunday and the corresponding values from a table.
Look at this example a={'25.10.2014' '2:00' 0.6379 0.6380 0.6376 0.6378 '26.10.2014' '2:00' 0.6379 0.6380 0.637...

11 years ago | 1

| accepted

Answered
a=1 2 3 4 5 6 7 8 9 b=0 1 1 2 3 2 3 2 1 resultant matrix is 1 0 2 1 3 1 4 2 5 3 6 2 7 3 8 2 9 1
a=[1 2 3; 4 5 6; 7 8 9] b=[0 1 1; 2 3 2; 3 2 1] [n,m]=size(a) c=zeros(n,2*m) c(:,1:2:end)=a c(:,2:2:end)=b

11 years ago | 0

Answered
Compare two matrix and delete the same rows
A= [1 2 3; 4 5 6; 6 7 8] B= [4 5 7; 1 2 3; 7 6 4; 6 7 8] B(ismember(B,A,'rows'),:)=[]

11 years ago | 3

Answered
if x==2.4 not working
read this <http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F> You can use some to...

11 years ago | 0

| accepted

Answered
Question regarding writing data to txt file
A = [10,8,6;1,4,5] [n,m]=size(A) [ii,jj]=ind2sub(size(A),1:numel(A)) iA=reshape(ii,n,m)' jA=reshape(jj,n,m)' A=A' s1=spr...

11 years ago | 0

Answered
How to make vector of strings into column headers of table
a = {'Oct_2014' ;'Nov_2014' ; 'Dec_2014'} b=array2table([10 12 14],'VariableNames',a)

11 years ago | 0

Answered
How to convert number to string vector
a = [2014;2014]; b = [10;11]; c = [25; 24]; x=[a b c zeros(numel(a),3) ] out=datestr(x,'yyyy_mmm_dd')

11 years ago | 0

| accepted

Answered
Count unique categorical values in table
Look at this example LastName = {'Smith';'Johnson';'Williams';'Jones';'Brown'}; Age = [38;43;38;40;40]; Height = [71;69;64...

11 years ago | 0

Answered
plot some lines only
idx=[1:14 26:38] plot(x(idx),y(idx))

11 years ago | 0

| accepted

Answered
How do I fix my elements in my code so that they can be the same?
Write Bn(n,:) = ((2*S)/(k*Lx))*((-1)^n)./((Ln.^3).*cosh(Ln*Ly))

11 years ago | 0

| accepted

Answered
Solve a second order differential equation in matlab?
You can transform your equation |d2y/dx2=.-5dy/dx-7y| to get: y1=y y2=dy/dx dy1=dy/dx=y2 dy2=d2y/d2x=-5dy/dx-7y=-5y2...

11 years ago | 0

| accepted

Answered
Arduino Due and simulink voltage resolution
This depends on the analog-to-digital converter of your card.

11 years ago | 0

Answered
How to write script matlab code in simulink?
you can use <http://www.mathworks.com/help/simulink/slref/set_param.html set_param function> Look at these examples: <http:/...

11 years ago | 0

| accepted

Answered
Allocating values in a 3D array using nested for loops
A=permute(reshape(24:-1:1,2,3,4),[2 1 3])

11 years ago | 1

Answered
Changing length of bar in legend
You can change the position bar([1,2;3,4]) h=legend('one','two') pos=get(h,'position') new_pos=pos new_pos(3)=pos(3)+...

11 years ago | 1

Answered
How to combine 3 dataset in MATLAB
out=[x1 x2 x3]

11 years ago | 1

| accepted

Answered
can any one tell me how to find z transform of unit step??
That depends on how the function heaviside is defined. In Matlab heaviside is defined as f[n]=0 if n<0 f(0)=1/2 f(n)=...

11 years ago | 0

Load more