Answered
Simple Counter Problem using (i+1)
change your for loop for i=1:906-1;

12 years ago | 0

| accepted

Answered
Create new variable based on existing columns of a cell
Using table M=cell2table(A(2:end,:),'Variablenames',A(1,:)) [ii,jj]=unique(M(:,1:2)) a=[ii M(jj,4)] out=unstack(a,'c4','...

12 years ago | 1

Answered
Erase rows of a cell based on a condition
To get CA A ={ ' A' 1997 1999 2000 2001 2002 13 189 189 39 39 39 16 183 183 183 183 183 18 76 7...

12 years ago | 1

| accepted

Answered
Saving figures in batch mode
h=findobj('type','figure') % find the handles of the opened figures folder='E:' % Desination folder for k=1:numel(h) f...

12 years ago | 1

Answered
Create new variable based on existing columns of a cell
A={'c1' 'c2' 'c3' 'c4' 'c5' 1 2006 20060425 559 'IA' 1 2007 20070129 559 'LO' 1 2...

12 years ago | 2

| accepted

Answered
Merging of cell data .
a ={ [2] [3] [4] [5] [6]} b=str2double(strjoin(cellfun(@num2str,a,'un',0),''))

12 years ago | 0

| accepted

Answered
how to create a multi dimension matrix
You can use a struct class v=struct('name',{'tom','jerry','kim'},'age',{12 15 20},'height',{6 5 4}) To acces your data ...

12 years ago | 0

| accepted

Answered
Creating a Text file from other text file
out=regexp(sprintf('AAA BBB %d,',1:10),',','split') out(end)=[] %or str='AAA BBB' out=genvarname(repmat({str},11,1...

12 years ago | 0

Answered
How to "activate" or "deativate" 'to Workspace' simlunk block from m-code?
You have N output given by N to worksapce blocks, then you can display the output you want, What is the problem with that?

12 years ago | 0

| accepted

Answered
How to display Simulink simulation time?
You can use a <http://www.mathworks.com/help/simulink/slref/clock.html clock> block and <http://www.mathworks.com/help/simulink/...

12 years ago | 0

| accepted

Answered
How do I extend cell to a larger dimension.
A = {'a','b'; 'c','d'}; C = repmat({'n'},3,4) [n,m]=size(A) C(1:n,1:m)=A

12 years ago | 0

| accepted

Answered
How to extract a number from a string
string='de orvalho: 16° C</li' out=str2double(regexp(string,'\d+','match'))

12 years ago | 0

| accepted

Answered
simplifying symbolic expressions with factors of pi
vpa(FF) or vpa(FF,4)

12 years ago | 0

Answered
plotting 3 lines in same axes (same figure) with different colors
ids=[1;2;3;4;5;6;7;8;9;10]; dx=[0.1;0.2;0.3;0.4;0.5;0.6;0.7;0.8;0.9;0.10]; dy=[0.01;0.02;0.03;0.04;0.05;0.06;0.07;0.08;0...

12 years ago | 0

Answered
Moving Average Filter in Simulink
You can use a <http://www.mathworks.com/help/simulink/slref/matlabfunction.html Matlab function> block, and declare the current ...

12 years ago | 0

Answered
How to compare rows in a matrix
Comparison between row 1 and row 2 A =[ 1 1 0 0 0 0 -1 0 1 0 -1 0 1 ...

12 years ago | 0

| accepted

Answered
How to aggregate elements of a cell array in Matlab
If you mean how to sort your data v={'C1' 'C2' 'C3' 'C4' 'C5' 1997 'AA' 123 7863 0.4 1997 'AA' 45 3421 0.8 1997...

12 years ago | 2

| accepted

Answered
Read a data set and bin it to different groups.
a=[2004017 2004018 2004018 2006019 2004019 2004017 2004018 2004018 2005019 2004019 2004017 2004018 2004018 20084019 200401...

12 years ago | 0

Answered
How to create a legend for a variable used as for loop iteration?
To concatenate a string with a number number=10 out=sprintf('SNR%d',number)

12 years ago | 0

Answered
Count the number of times a value occurs in a specific of an array
A=[1,2,5,2,3,4,2; 4,2,1,5,3,2,3; 1,4,2,3,2,2,1] sum(A(2,:)==2) %or nnz(A(2,:)==2)

12 years ago | 6

| accepted

Answered
is possible withdraw valour with problems of an matrix?
If you have a vactor A=[1 2 100 15] You can delete the third element by A(A==100)=[] But if you have a matrix ...

12 years ago | 0

Answered
Using tables in earlier versions.
Use <http://www.mathworks.com/help/matlab/ref/table2cell.html table2cell> function to convert your table data to a cell array, a...

12 years ago | 0

| accepted

Answered
Extract x,y data from plot
Select the cylinder then write x=get(gco,'Xdata') y=get(gco,'Ydata') z=get(gco,'Zdata')

12 years ago | 1

Answered
Saving figures in matlab
% Example h=plot(sin(0:0.01:10)) saveas(h,'your_file.jpg')

12 years ago | 0

| accepted

Answered
how can model a transfer function block whose coefficient varies?
You can write your equation in time domain, then use the blocks (derivative, gain,sum,..) to construct your model

12 years ago | 0

Answered
Sizing vector for plotting
A = [29.44 29.45 29.47 29.49 29.46 29.47 ] B = [ 1.34 1.36 1.37 1.39 1.38 1.41 1.42 1.40 ] na=numel(A) nb=numel(B) ta=1:na...

12 years ago | 0

| accepted

Answered
Convert String Headers to Numbers
% If your matrix looks like M=[1 2 3 4 5 6;0 0 0 1 1 1;2 1 2 0 1 0] out=permute(reshape(M',size(M,1),3,[]),[2 1 3])

12 years ago | 0

Answered
Filter out nonzero number in array of n*2 dimension.
A(all(A,2),:)

12 years ago | 0

| accepted

Answered
convert matrix and horizontally catenate
A=A' A=A(:)' Or reshape(A',1,[])

12 years ago | 1

| accepted

Answered
Repeating matrix multiplication linear system
A =[ 0 0 45 1/25 0 0 0 39/100 3/10] e = 2000; l = 100; a = 25; x = [e; l; a]...

12 years ago | 0

| accepted

Load more