Answered
how to pick out postion in a vector
a= [ 1,0,8,0,5,0,3,0,6,9] idx=find(~a)

13 years ago | 0

Answered
Collating rows based on constraints
a=[ 1 2 10 1 2 20 2 1 11 2 2 10 2 1 1] [ii,jj,kk]=unique(a(:...

13 years ago | 2

| accepted

Answered
run simulink with GUI with set_param()
set_param allows to change any parameters block in your simulink model Look at <http://www.mathworks.com/help/simulink/slref...

13 years ago | 0

Answered
How can I layer coordinate matrixes into a cell of vectors? (iteration over matrices)
x=[1,2;1,2]; y=[1,1;2,2]; z=[5,6;7,8]; A=arrayfun(@(a,b,c) [a b c],x,y,z,'un',0)

13 years ago | 1

| accepted

Answered
how to label y axis of a graph in horizontal manner
Example y=[1 2 3 4]; plot(y), set(gca,'ytick',y,'yticklabel',{'Jan','Feb','March','April'})

13 years ago | 0

| accepted

Answered
how to label y axis of a graph in horizontal manner
By default, y ticks are horizontal

13 years ago | 1

Answered
how to add text to a pie chart?
days= {'Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'}; percentage=[100/7 100/7 100/7 100/7 100/7 100/7 10...

13 years ago | 0

| accepted

Answered
How could I make a 3d animation in Simulink?
Use a <http://www.mathworks.com/help/sl3d/vrml-editors.html vrml> editor to create the model you want to animate. Each object in...

13 years ago | 0

Answered
how to save the figure?
fichier=fullfile('directory','filename') saveas(gcf,'fichier.jpg')

13 years ago | 0

Answered
Remove values from matrix based on another matrix
B=B(1:45,1:73,1:28)

13 years ago | 0

| accepted

Answered
Assign a Name for Each Iteration
for i = 1:3 x(i) = i^2 end

13 years ago | 0

Answered
matrix manipulation and components
out=A(A>3.1)

13 years ago | 2

Answered
Looping Structrures with a Name
name1={S.Tornadoname} name2={S.Hurricane}

13 years ago | 1

Answered
Summing with respect to values within variable instead of rows, columns, or equal windows
v=unique(a(:,1),'stable'); s=zeros(numel(v),1); for k=1:numel(v) s(k,1)=sum(a(ismember(a(:,1),v(k)),2)); end out=[v s...

13 years ago | 0

Answered
How to delete particular row from struct array?
s1=struct('a',num2cell(1:10),'b',num2cell(11:20),'c',num2cell(21:30)) label=9 s1(label)=[]

13 years ago | 4

Answered
Variable file path for importdata
bottom_temp = fullfile('Temperatures','Bottom',[str,'.txt'])

13 years ago | 1

| accepted

Answered
Searching the location of a specific cell in a cell array
v={[1 2], [3 5], [4,2],[3 5] ,[4 2]} w=cell2mat(v') idx=find(ismember(w,[4,2],'rows'))

13 years ago | 0

| accepted

Answered
Eliminate rows of cell array outside of a range
a= final2{1} a(a(:,1)>-6 | a(:,1)<-7,:)=[] final2{1}=a

13 years ago | 0

Answered
Plot multiple workspace in a for loop
figure; hold on for k=1:297 data=eval(sprintf('A%d',k)) plot(data(:,1),data(:,2)) end hold off

13 years ago | 0

| accepted

Answered
How to manipulate a file path
selected_folder='C:\Program Files\User\Test\' idx=strfind(selected_folder,'\') folder=selected_folder(1:idx(end-1))

13 years ago | 1

| accepted

Answered
matrix manipulations of columns
A(:,5)=zeros(size(A,1),1)

13 years ago | 1

| accepted

Answered
matrix manipulations of columns
A=random('norm',3,0.2,100,100) A(:,2:2:end)=ones(size(A(:,2:2:end)))

13 years ago | 0

| accepted

Answered
build a matrix from cell
X={magic(5);eye(4);rand(6)} m=numel(X); n=max(cellfun(@(x) size(x,1),X)); out=zeros(n,m); for k=1:m a=X{k}(:,1); ...

13 years ago | 0

Answered
build a matrix from cell
X={magic(4),eye(4),rand(4)} % Example y=cell2mat(cellfun(@(x) x(:,1),X,'un',0))

13 years ago | 0

Answered
Writing into excell spreadsheet using matlab
xlswrite('filname.xls',cellstr('hello'))

13 years ago | 0

| accepted

Answered
i've a matrix of 6x4 and i want to count the rows how many times it occur in a matrix
A=[ 12 45 67 89 34 56 78 65 12 45 67 89 53 55 21 90 12 45 67 89 53 55 21 90 ] [a,b,c]=unique(A...

13 years ago | 1

| accepted

Answered
using the while command
You should use only while loop (remove the for loop), then increment the variable i inside the while loop (i=i+2).

13 years ago | 0

| accepted

Answered
How to change color of x and y axis by red and blue
set(gca,'xcolor','r','ycolor','b')

13 years ago | 1

| accepted

Answered
Numeric Derivative - problem entering df
df=2*x./(1+x.^2)-2*x.*sin(x.^2).*exp(1).^cos(x.^2)

13 years ago | 1

| accepted

Load more