Answered
I have a cellArray data and I extracted the first column of this cellArray. In another function when I call this data with global this data looks empty.
Avoid global, you can use for example guidata function pushbutton1_Callback(hObject, eventdata, handles) handles.out1=...

13 years ago | 0

| accepted

Answered
Read a Matrix variable in simulink
Use a constant block

13 years ago | 1

| accepted

Answered
How to rename many files efficiently?
system('rename old_name new_name')

13 years ago | 0

Answered
I have 2 coordinate systems. Each of them includes several common points. I wanna check that whether these common points id are the same or not.
If you want to compare the first column of datum1 and datum2 isequal(datum1(:,1),datum2(:,1))

13 years ago | 0

| accepted

Answered
Integrating sin(2x) in MATLAB
(-1/2)*cos(2x)=(-1/2)*(cos^2(x)-sin^2(x)) =(-1/2)*(1-sin^2(x)-sin^2(x)) =(-1/2)+sin^2(x) ...

13 years ago | 2

Answered
how to sort array of time format from min to max time value?
A={'22:14:98' '22:13:98' '22:15:98';'22:17:98' '22:18:98' '22:11:98'} out=arrayfun(@(x) datestr(x,'HH:MM:SS'),sort(cellfu...

13 years ago | 1

Answered
b=regexprep(b,'^','.^','all'); doesn't works.
b=regexprep(b,'\^','.\^')

13 years ago | 0

Answered
Counting the number of runs in a sequence
numel(strfind(A,[0,1]))+ numel(strfind(A,[1,0]))+1

13 years ago | 1

Answered
merge arrays of different types to write in excel sheet
Example a=repmat('a',4,8) b=rand(4,1) out=[cellstr(a); num2cell(b)]

13 years ago | 1

| accepted

Answered
how to find minimum time format for each row of a cell array?
all_dis={'00:00:21' '00:00:23' '';'12:00:21' [] '11:00:23' } a=cellfun(@datenum,all_dis,'un',0) a(cellfun(@isempty,a))...

13 years ago | 1

| accepted

Answered
How do i get the Transfer function of sinh(s)/cosh(s) in matlab?
Look at tf help. The numerator and denominator should be a polynomial of s, not sin or any different function

13 years ago | 0

Answered
How to plot using all the for loop values
You have to use: k(P) instead of k syms x C=1;D=1;E=1;N=1;W=1; alp=1; z=1; for P=1:1:20 aa=(sqrt(-1))*(C-P); ...

13 years ago | 2

| accepted

Answered
How to plot a 2D graph using all the for loop values
Your errors: # you can not use a negative index # when you write |for w=-20:20,| at the end of the loop |w=20|, is just one...

13 years ago | 3

| accepted

Answered
Generate User Request Editbox
you can create 5 editbox for example, make them invisible by set(handles.editbox1,'visible','off') When the user ask for...

13 years ago | 0

| accepted

Answered
what does the four vector mean in matlab legend 'Position'?
pos(1) and pos(2) are the coordinate of the legend windows pos(3) and pos(4) are width and height of this windows

13 years ago | 2

Answered
How to save Simulink model as picture?
Look at this answer <http://www.mathworks.com/matlabcentral/answers/65220-how-do-i-save-simlulink-model-to-jpg-or-any-other-imag...

13 years ago | 1

Answered
Retrieving Rows based on Multiple Columns
c=cell2mat(var2(:,1)); idx=arrayfun(@(x) find(ismember(c,x))',var1(:,[2 3 4 5]),'un',0) idx1=arrayfun(@(x) cell2mat(idx(x,:)...

13 years ago | 1

| accepted

Answered
Retrieving Rows based on Columns
c1=cell2mat(var2(:,1)) idx=cell2mat(arrayfun(@(x) find(ismember(c1,x)),var1(:,1),'un',0)) out=var2(idx,:)

13 years ago | 1

| accepted

Answered
group data into categories which display the category name
data=[25 90 95 185 275 360]; s='ABCD', idx=ceil(data/90) idx(idx==0)=1; out=s(idx)

13 years ago | 0

Answered
How to import array of different size in structure
for k=1:3 a=importdata(sprintf('text%d.txt',k),' ',1); v=a.data time{k}=v(:,1) end

13 years ago | 0

Answered
What's the meaning of mmult in matlab
Look at the help out = mmult(mat1,mat2,mat3,...,matN) Multiplies SYSTEM/VARYING/CONSTANT matrices, currently ...

13 years ago | 0

Answered
Get lengths of nonuniform-length character strings in an array without counting padded blanks
out=cellfun(@numel,cellstr(A))

13 years ago | 0

| accepted

Answered
textscan not reading file properly
M=xlsread('data.xlsx');

13 years ago | 0

Answered
Simulink - Building Models using MATLAB Code
Look at <http://www.mathworks.com/matlabcentral/answers/68224-generating-matlab-code-to-reproduce-simulink-model>>

13 years ago | 0

| accepted

Answered
Concatenating cell array elements
C= cellfun(@(x,y) [x;y],A,B,'un',0)

13 years ago | 1

| accepted

Answered
Find common elements(?) in two arrays
[ii,jj]=find(A==B) % you can add out=[ii jj]

13 years ago | 1

| accepted

Answered
How to display all figures
%each plot in one figure figure(1) plot(x1,y1) figure(2) plot(x2,y2) %and so on %All plot in one figure figu...

13 years ago | 3

| accepted

Answered
How can I rite a program to roll x number of dice and take the lowest value out while adding the rest?
A=randi([1 6],1,4) B=sum(setdiff(A,min(A))) %or B=sum(A)-min(A)

13 years ago | 0

| accepted

Answered
basic questions how to find x
y=@(x) 5*x+2 y(2)

13 years ago | 1

| accepted

Load more