Answered
increase dimension plot window
hFig = figure(1); set(gcf,'position',get(0,'ScreenSize'))

13 years ago | 0

Answered
Switch/case in cell array of strings
choice='Yes' switch choice case {'Yes','Yes'} y=1 case {'Yes','No'} y=2 case {'No','Yes'} ...

13 years ago | 0

Answered
Convert individual values in a matrix to letters and keep remaining as numbers
airline_names = cellstr(['AC_ '; 'FI_ '; 'QR_ '; 'SK_C'; 'SQ_ '; 'STB '; 'STE '; 'TG_ ']) usage=randi(8,8,1) out=airline_nam...

13 years ago | 0

| accepted

Answered
To generate unique vectors
What if you use P=dec2bin(K,16);

13 years ago | 0

Answered
how to plot graph
If you have the data (y for example) use plot(y) legend('ESD status') grid on

13 years ago | 0

Answered
How to change the x axis label
xt=get(gca,'xtick') new_xt=num2cell(linspace(4,6,numel(xt))) set(gca,'xticklabel',new_xt)

13 years ago | 0

Answered
Can 'Place' command in matlab place the poles of A-BK in the same order as given in the input argument of place function?
The order of the pĂ´les does not matter, if you want to get the same order you can use the sort function

13 years ago | 0

Answered
How to find the number of consecutive occurrence of the numbers?
A=[1,2,2,3,1,2,3,1,1,1]; ii=num2str(diff(A)); ii(strfind(ii,' '))=[]; jj=regexp(ii,'[^0*]','split'); jj(strcmp(jj,''))=[];...

13 years ago | 2

Answered
Generate set of feasible points for a function?
a=arrangement([1 0],3); co1=[5 5 3]; co2=8 b=sum(bsxfun(@times,a,co1),2)-co2; out=a(b<=0,:) % Before runing the above c...

13 years ago | 0

Answered
Attempted to access TPvhs.data(3); index out of bounds because numel(TPvhs.data)=1.
Maybe you should do v=TPvhs(3).data; h=TPvhs(4).data; s=TPvhs(5).data;

13 years ago | 0

| accepted

Answered
How to tell if there are at least 5 consecutive entries in one 8-by-1 matrix with 8 integers?
a=[1; 2; 3; 5; 6; 7; 9; 10] a=sort(a) e=[1 ;diff(a)]; e(e==0)=1; idx=~isempty(strfind(e',[true,true,true,true])) % it exi...

13 years ago | 0

Answered
Undefined function 'step' for input arguments of type 'double'
Are you sure you have a control toolbox? type which step

13 years ago | 0

Answered
looking for an alternative to ginput(n) to select a region on an image
You can use <http://www.mathworks.com/help/images/ref/imrect.html imrect> function

13 years ago | 0

Answered
How to tell if there are at least 5 consecutive entries in one 8-by-1 matrix with 8 integers?
a=[3 2 3 4 5 5 7 6 8]; e=[1 diff(a)]; e(e==0)=1; idx=strfind(e,[true,true,true,true]) % it exist if idx~=0

13 years ago | 0

Answered
How to convert to .exe file
Look at this <http://www.mathworks.com/videos/working-with-the-matlab-compiler-deployment-tool-68743.html tutorial>

13 years ago | 0

Answered
Matrix is close to singular or badly scaled
In your case the result is correct, you can check: a*inv(a) % is an identity matrix

13 years ago | 1

Answered
How to execute the callback of a pushbutton which is behind another pushbutton?
If the other pushbuttons are not visible, This is not possible

13 years ago | 0

| accepted

Answered
Delete letters in a string variable
s={'2456.00A', '2501A'}; out=cellfun(@(x) x(regexp(x,'[^a-zA-Z]')),s,'un',0)

13 years ago | 1

Answered
Files in different folders
folders={f1,f2,f3}; % your folders for k=1:numel(folders) f=dir([folders{k} '/*.jpg']); files{k}={f.name}; end for ii...

13 years ago | 0

Answered
Creating a frequency table
a=arrayfun(@(z) sum(ismember(x,z)),0:4)' out=[(0:4)' a 100*a/numel(x)]

13 years ago | 0

| accepted

Answered
To save workspace variables automatically
save yourfilename doc save doc load

13 years ago | 0

| accepted

Answered
Read cell via indexing multiple times, without using for-loop
idx=Options(sum(bsxfun(@times,IndexMatrix,1:3),2))

13 years ago | 0

Answered
Creating a frequency table
x=[1 1 2 2 1 2 ] y=[x 5] out=tabulate(y) out(end,:)=[]

13 years ago | 0

Answered
How can I change the scaling of the y-axis on a semilogy plot?
set(gca,'yscale','log')

13 years ago | 0

| accepted

Answered
How to store the current time in SImulink?
You can use a <http://www.mathworks.com/help/simulink/slref/clock.html clock> block

13 years ago | 0

Answered
fft matlab, scaling amplitude problem
That means that, before calculating the fft, you've made some errors, which we can't find, because you have not posted the code....

13 years ago | 0

Answered
Index out of bounds
The problem is clear The size of z is [22719,1], which means z(:, 19) does not exist

13 years ago | 0

| accepted

Answered
Find string with options (*)
s='123 sdd5 Object(1)= 25 333sss' idx=strfind(s,'Object(1)=') %or k=123 pattern=sprintf('Object(%d)=',k) s='123 sdd...

13 years ago | 0

Answered
How to pad zeros to an array?
A=[1 2 3 4 5] A=[A zeros(1,5)] %or A(end+1:end+5)=0

13 years ago | 1

| accepted

Answered
what is the difference between sym2poly and coeffs?
syms x u %first example y=x^3 - 2*x - 5 sym2poly(y) % considere y as a polynome ans = 1 0 -2 -5 coeffs...

13 years ago | 0

Load more