Answered
how to change initial conditions in Simulink?
The initial value of a unit delay block is taken in account at the beginning of the simulation, what is the purpose of changing ...

13 years ago | 0

Answered
What does ''Busy'' signify ?
Busy means the computer is busy executing your code, which takes a certain time to finish Will you get the result if you wait...

13 years ago | 0

Answered
How can variables be passed to a function
function zp=F(x,z,a,kx) zp=zeros(2,1); zp(1)=z(2); zp(2)=a*sqrt(1+z(2)^2)+kx; % --------------------------------------...

13 years ago | 0

| accepted

Answered
how to find the total number of ones from the given input...
a=1, b=1, c=1, d=0 Instead of using all these variables, you can use just one array v=[a b c d ] To count number...

13 years ago | 0

| accepted

Answered
step response of a siso system.
The step function uses a unit step signal, if you want to use a step signal with k magnitude, just use step(k*trans) ...

13 years ago | 0

Answered
Selecting rows related with specfic measurement time
You need to specify the format of your date datenum('11-09-2013 11:20:00 PM','dd-mm-yyyy HH:MM:SS AM')

13 years ago | 0

Answered
How to initialize GUI input from data and user
handles.a=[1 2 3; 4 5 6; 7 8 9] guidata(hObject,handles) To get the value of a a=handles.a

13 years ago | 0

Answered
changing axis on a plot
set(gca,'xtick',[1 2 3 4],'ytick',[8 10 12 21])

13 years ago | 0

Answered
selecting specific values on a matrix
A(4:end,6:10) Look at doc array

13 years ago | 0

| accepted

Answered
sometimes i lost >> ,what should i do?
I think you can type return

13 years ago | 0

Answered
classify a matrix according to a "flag" value
out=A(A(:,3)==0,:)

13 years ago | 0

| accepted

Answered
Sorting Algorithm for Matlab
A={[7 5 1],[8 9 2],[3 5]} idx2=cumsum(cellfun(@numel,A)); idx1=[1 idx2(1:end-1)+1]; C=sort(cell2mat(A)); out=arrayfun(@(...

13 years ago | 0

| accepted

Answered
How can i plot the results of two separate m files in same figure window.
plot(x1,y1,x2,y2) %or plot(x1,y1) hold on plot(x2,y2) hold off %or plotyy(x1,y1,x2,y2)

13 years ago | 0

Answered
Elements From a Matrix A bit Off
Look at <http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F>

13 years ago | 0

Answered
how do you write a conditional struct?
Maybe you are asking about <ww.mathworks.com/help/matlab/ref/if.html if/elseif/else>

13 years ago | 0

Answered
Simulink/SimMechanics: how to refer to a value from the previous time step
Use <http://www.mathworks.com/help/simulink/slref/unitdelay.html Unit Delay> block

13 years ago | 0

| accepted

Answered
sum values in a vector to extract nth term into new matrix?
A =[ 3.0000 2.2200 5.0000 2.2187 7.0000 2.2171 9.0000 2.2132 11.0000 2.2168 13.0000 ...

13 years ago | 0

| accepted

Answered
Even and Odd parts
t=-10:10; %vector time x=rand(1,numel(t)); % Your signal xmt=[fliplr(x(t>=0)) fliplr(x(t<0))] xe=0.5*(xmt+x) xo=0.5*(x-xmt...

13 years ago | 2

Answered
How to implement a function call/return in simulink ?
Have you tried <http://www.mathworks.com/help/simulink/slref/interpretedmatlabfunction.html Interpreted Matlab Function> block

13 years ago | 0

Answered
extruct non zeros values and put into a short matrics
out=cell2mat(arrayfun(@(x) A(x,A(x,:)~=0),(1:size(A,1))','un',0)) %or n=size(A,1); B=zeros(n,3); for k=1:n B(k,...

13 years ago | 1

Answered
I am getting an error using lsim for discrete time system?
You did not specify the time vector while using lsim function Ts=1% your sample time t=0:Ts:(numel(U)-1)*Ts; % vector ti...

13 years ago | 0

Answered
How do I output my data as a list?
A11=D(1:2) A12=D(2+1:end)

13 years ago | 0

Answered
how to read two gray-scale images?
Use imread function

13 years ago | 0

Answered
Problem in assignning the real of complex number
x=2+2*j; |real(x)| will return the real part of |x| , if you want to assign |0| to |real(x)| , just write x=imag(x)*i ...

13 years ago | 0

Answered
Merging cells,adding contents
v={'Mary' [ 37] 'Lisa' [ 18] 'George' [ 20] 'Nick' [ 49] 'Mary' [ 24] 'George' [ 4...

13 years ago | 0

| accepted

Answered
extract some special element from a vector and reverse it?
s=[5 9 0 6 0 7 8 3 0 4 1 2]; SubVector=[6 7 8 3 4]; [ii,jj]=ismember(SubVector,s); s(jj)=fliplr(SubVector)

13 years ago | 0

| accepted

Answered
how Slope of a line?
diff(v)./diff(t)

13 years ago | 0

Answered
Converting each matrix entry to specific string
arrayfun(@(ii) X(ii),A,'un',0)

13 years ago | 0

| accepted

Answered
how to divide data array into a number of blocks like this using a For Loop?
N=16 nb=[1 2 4 8] data=1:N for k=1:numel(nb) ii=nb(k); v=zeros(ii,N) for p=1:size(v,1) idx=(p-1)*N/...

13 years ago | 2

| accepted

Load more