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

alrededor de 11 años hace | 11

| aceptada

Respondida
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...

alrededor de 11 años hace | 0

Respondida
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)

alrededor de 11 años hace | 0

Respondida
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

alrededor de 11 años hace | 0

| aceptada

Respondida
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...

alrededor de 11 años hace | 1

Respondida
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)]

alrededor de 11 años hace | 0

Respondida
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...

alrededor de 11 años hace | 1

Respondida
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...

alrededor de 11 años hace | 1

| aceptada

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

alrededor de 11 años hace | 4

| aceptada

Respondida
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']

alrededor de 11 años hace | 1

| aceptada

Respondida
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); ...

alrededor de 11 años hace | 0

| aceptada

Respondida
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 ...

alrededor de 11 años hace | 0

| aceptada

Respondida
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=...

alrededor de 11 años hace | 0

| aceptada

Respondida
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))

alrededor de 11 años hace | 0

| aceptada

Respondida
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'})

alrededor de 11 años hace | 1

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

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 0

| aceptada

Respondida
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))

alrededor de 11 años hace | 3

| aceptada

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

alrededor de 11 años hace | 1

| aceptada

Respondida
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...

alrededor de 11 años hace | 0

| aceptada

Respondida
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...

alrededor de 11 años hace | 0

| aceptada

Respondida
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...

alrededor de 11 años hace | 0

Respondida
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; ...

alrededor de 11 años hace | 0

| aceptada

Respondida
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>

alrededor de 11 años hace | 1

Respondida
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

alrededor de 11 años hace | 0

Respondida
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]); ...

alrededor de 11 años hace | 3

| aceptada

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

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 1

Respondida
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>

alrededor de 11 años hace | 0

Cargar más