Beantwortet
Finding position of a string in a cell array
s={'AGGH' '' 'ANYN' '' 'AYBK' '' 'AYDU' '' 'AYGB' } find(strcmp(s,'ANYN' ))

fast 11 Jahre vor | 11

| akzeptiert

Beantwortet
How should the variable declared in popup menu be called in pushbutton call back function . Can anybody help me out with this? Please. Thank you Deepa
What is the aim of this? set(handles.popupmenu1, 'UserData') Maybe you want set(handles.popupmenu1, 'UserData',Valu...

fast 11 Jahre vor | 0

Beantwortet
How do I split my 200 pixel image up into 8 by 8?
A=rand(200) p=1:25:200 [ii,jj]=ndgrid(p,p) out=arrayfun(@(x,y) A(x:x+24,y:y+24),ii,jj,'un',0)

fast 11 Jahre vor | 0

Beantwortet
Perform Operation on only even rows.
A=randi(9,10,4) idx=2:2:size(A,1); Ae=A(idx,:) Ae1=circshift(Ae,[0 -2]) A(idx,:)=Ae1

fast 11 Jahre vor | 0

| akzeptiert

Beantwortet
Monthly Average for Large Dataset
If your text file looks like 2000 02 01 1001 25 25 2000 02 01 2310 45 46 2000 03 02 1121 33 36 2000 03 02 1141 33 36 2...

etwa 11 Jahre vor | 1

Beantwortet
How to add zeros to 2 x vectors where there are no matches, to get the same length ?
n=max(numel(x),numel(x1)) x=[x zeros(1,n)] x1=[x1 zeros(1,n)] y=[y zeros(1,n)] y1=[y1 zeros(1,n)]

etwa 11 Jahre vor | 0

Beantwortet
How to change variable name in each loop iteration?
This is a bad idea <http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F> But if you...

etwa 11 Jahre vor | 1

Beantwortet
how to rotate X Tick Label ?
The xticklabelrotation property is not supported by versions before Matlab R2014b. However you can find some application in File...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
Where i find complete list of matlab commands and functions. Specially array manipulations
<http://www.mathworks.com/help/matlab/functionlist-alpha.html>

etwa 11 Jahre vor | 4

| akzeptiert

Beantwortet
Combine ascii files of different size
Lon= [-180 10] Lat= [-90 0 60] Depth= [1 2 3 4 5 6] [ii,jj]=ndgrid(Lon,Lat); out=[ii(:) jj(:) Depth']

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
troble in applying for loop
k=0 h=zeros(size(1:5:numel(S))) for ii=1:5:numel(S) k=k+1 h(k)= phi_sync(ii) + phi_acc(ii); ...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
Identifying a repeating number in a large data file
A function that finds these numbers is <http://www.mathworks.com/help/matlab/ref/find.html find> Example: A=[1 2 3 9 4 ...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
Transition Matrix that compares two elements to the next two elements.
a=[1 2 1 1 1 2 2 2 1 1 1 2 2]; b=[0 1 0 0; 0.5 0 0 0.5; 1 0 0 0; 0.5 0 0.5 0]; state=[1 1;1 2;2 1;2 2]; q=zeros(4); for k=...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
How to read a *.csv file where the numbers are in quotes ("1","2", ...)?
[a,b,c]=xlsread(yourfile) s=regexp(b,'[\d.]+','match') out=str2double(cellfun(@(x) x{:},s,'un',0))

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
How can I give a different legend for each element of a vector in a scatter plot?
A=[1:3]; B=[9:11]; figure; hold on for k=1:numel(A) scatter(A,B,'facecolor','b') end hold off legend({'a','b','c'})

etwa 11 Jahre vor | 1

Beantwortet
shade area under a semilog plot
Use H1=area(log10(freq),pnoise)

etwa 11 Jahre vor | 0

Beantwortet
Oversampling in PID tuning
# The best way to do what? # Your PID is continue or discrete? # How about the system you are controlling?

etwa 11 Jahre vor | 0

Beantwortet
Load file with certain number
r=sprintf('%d',A(4)-1) data=load(r)

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
How to convert a cell array of cell arrays to matrix ?
C={{1 3 4};{1 3 3}} out=cell2mat(cellfun(@(x) cell2mat(x),C,'un',0))

etwa 11 Jahre vor | 3

| akzeptiert

Beantwortet
How to find out the TimeUnits?
get(sys,'TimeUnit') Or sys.TimeUnit

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
MATLAB : compare hours (hh:mm:ss)
x = {'05:05:05', '05:05:06', '05:05:09', '05:05:10'} p='05:05:07' xx=datenum(x) pp=datenum(p) [~,idx]=min(abs(xx-pp)) ou...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
Focus plot and apply correct tick labels
Look at this example t=0:0.1:10 y=8*rand(size(t))-4 plot(t,y) ylim([-1 1]) xl=xlim nt=8 % number of ticks xt=linspac...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
How to run program once for every new image stored in folder?
folder='C:\FTP\testing2' type='*.jpg' srcFiles = dir(fullfile(folder,type)); for ii= 1 : length(srcFiles) fi...

etwa 11 Jahre vor | 0

Beantwortet
Set and reset Simulink
Try this function z=fcn(x,reset) persitent xx if isempty(xx) xx=0 end if (x==7|xx==1) & reset==0 z = 6; ...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
How to store the result of a For Loop in an Array ?
Read the documentation, you will find examples <http://www.mathworks.com/help/matlab/matlab_prog/loop-control-statements.html>

etwa 11 Jahre vor | 1

Beantwortet
please can any one help me i whrite this code to plot a figure but it give me an empty one ?
Your are plotting one point

etwa 11 Jahre vor | 0

Beantwortet
shade area under curve between 2 x-axis limits
x=0:pi/50:2*pi; y1=x.^2; H1=area(x,y1); hold on idx=x>3&x<4; H=area(x(idx),y1(idx)); set(H(1),'FaceColor',[1 0.5 0]); ...

etwa 11 Jahre vor | 3

| akzeptiert

Beantwortet
How to define variable block in Simulink ?
Maybe you want a <http://www.mathworks.com/help/simulink/slref/matlabfunction.html Matlab function block>

etwa 11 Jahre vor | 0

Beantwortet
Organizing dates and values using simple matrices
*Edit* %-----------------Example------------------------ A=[ {'year' 'month'} genvarname(repmat({'day'},1,31),'day');repma...

etwa 11 Jahre vor | 1

Beantwortet
How can i use the values obtained in a functional file in another file?
Read about <http://www.mathworks.com/help/matlab/ref/function.html functions>

etwa 11 Jahre vor | 0

Mehr laden