Answered
creating a table from an array or matrix
Use uitable Example data=rand(5,2); colnam ={'c1', 'c2'}, t=uitable('data',data,'columnname',colnam) Fore more...

14 years ago | 0

| accepted

Answered
STRCMP in a loop
Look at this example first_liste={'vert','jaune','rouge','azure','bleu'} second_liste={'verte','noire','cerise','rouge','b...

14 years ago | 0

Answered
Function Arguments Using Nargin
There is an error function plotinputs(x1,y2,x2,y2) it should be function plotinputs(x1,y1,x2,y2)

14 years ago | 0

Answered
I am trying to complete a while loop that uses letters instead of numbers as the accepted input. The accepted inputs are M,m,F,f. How do I prevent other inputs from getting through?
*EDIT* s=input('genre','s') genre='FfMm' while ismember(s(1),genre) % s is the input

14 years ago | 1

| accepted

Answered
how to comment part of the title?
str='A' title(sprintf('Read-range at %s of the antenna',str))

14 years ago | 0

Answered
Explain this while loop
numbers(1)=2 numbers(2)=4 numbers(3)=3 numbers(4)=-5 % before numbers becomes <0 the counter=3

14 years ago | 0

| accepted

Answered
Why the result of (1-0.6667)==0.3333 is zero in MATLAB? how can I get one?
Because 0.6667 and 0.3333 are codified and stored in the memory with a certain precision

14 years ago | 2

Answered
How do I plot a random number of rectangles using rectangle('Position', [x y w h])?
close hold on; for k=1:randi(100); rectangle('Position', 10*rand(1,4)) end hold off

14 years ago | 0

| accepted

Answered
Need help with factorizing array of numbers
You need to use a cell array to store the result for each number, because they are not the same length x =[94 89 124 120 15...

14 years ago | 0

| accepted

Answered
Replace a number by next occuring number twice
Example a=randi(1000,1000,1) b=a(a>=101 & a<=289) c=num2str(b+1) d=str2num([c c])

14 years ago | 0

| accepted

Answered
Subscript indices must either be real positive integers or logicals.
Vs(0) is not valid in matlab Use instead Vs(n+1,m+1)

14 years ago | 0

Answered
Making a table in Matlab 2007b
You can use <http://www.mathworks.com/help/matlab/ref/uitable.html uitable>

14 years ago | 0

Answered
What is the difference between a note and a song as seen by fast fourier transform?
I think it's complicated, when you play a song with multiple instruments, one note can be played at several fundamental frequenc...

14 years ago | 0

Answered
Define variable inputs for function
you can use a cell array v={fts1,fts2,...,ftsn} and use function newfts = merge(v)

14 years ago | 0

Answered
Accessing Dynamic Field References of Nested Structures
You can use getfield a.b.c=10 out=getfield(a.('b'),'c') %or a.b.c.d=10 x1=a.('b'); x2=x1.('c'); x3=x2.('d')

14 years ago | 0

Answered
removing equal elements from a matrix
a=[ 1 2 3 ; 3 4 5; 6 4 7]; b=unique(a(:))'

14 years ago | 0

| accepted

Answered
How to get numbers from string using match regular expression?
a=cellfun(@(x) regexp(x,'\d\d?\d?\d?','match','once'),txt,'un',0);

14 years ago | 1

Answered
Import text file with header
fid = fopen('file.txt'); line1 = fgetl(fid); res={line1}; while ischar(line1) line1 = fgetl(fid); res{end+1} =lin...

14 years ago | 1

Answered
How do I select the Lowest of two values and select that as the best answer
p1=0.42 p2=0.92 method={'p1','p2'} [val,idx]= min([p1 p2]) disp(['the best method is ' method{idx}])

14 years ago | 0

| accepted

Answered
Separating elements in Length vectors
v=min(x):60:max(x); % x is your array id=0; clear out for k=2:numel(v) [~,idx]=min(abs(x-v(k))); id(k)=idx; ...

14 years ago | 0

| accepted

Answered
How to import data from a specific folder in MATLAB
load(filenames(1).name)

14 years ago | 0

Answered
why am I get this error?: ??? Subscripted assignment dimension mismatch.
You can 't do this C(i,1) = B(67:74); Try this C = cell(1230,1); for i=1:1230 B = A(i,1); B = char(B); ...

14 years ago | 0

Answered
Seperating array by row label
x = {'Apple' [ 1] [ 0] [38] [ 1] [19] '8.9' 'Carrot' [-1] [ 4] [ 8] [ 4] [ 3] [...

14 years ago | 0

Answered
How to interpolate two data sets
Maybe you need to take the mean y1=[188 184 198 288]; y2=[168 168 216 290] y=mean([y1;y2])

14 years ago | 0

| accepted

Answered
PID Controller- not for simulation
What is your goal in using a numeric pid, which can be done by matlab for real application, insteat of an analogic pid controlle...

14 years ago | 0

Answered
Summing loop in simulink
Use a unit delay block or memory bllock

14 years ago | 0

Answered
Matching certain characters of strings
yourlist={'140221','140214','140111','140223','140544','140773'} type1=yourlist(cell2mat(cellfun(@(x) ~isempty(regexp(x,'\<1...

14 years ago | 0

Answered
Comparing characters in a matrix
strcmp(M(i),tmp)

14 years ago | 0

| accepted

Answered
creating a table in matlab
Use <www.mathworks.com/help/matlab/ref/uitable.html uitable>

14 years ago | 0

Answered
converting matrix into semicolon separated dataset
s='[' For k=1:size(d,1) s=[s num2str(d(k,:)) ';'] end s(end)=']'

14 years ago | 0

Load more