Answered
how to split large vector in small vector groups ?
Use |reshape| function

14 years ago | 0

Answered
Close command and Invalid figure handle
Maybe you are trying to close a figure that is already closed. Use close(p(1))

14 years ago | 0

Answered
Calculating displacement many times with respect to different elements
X your array out=bsxfun(@minus,X,[0 X(1,2) X(1,3)])

14 years ago | 0

Answered
What is the easier way of listing several symbolic variables?
for k=1:20; syms(sprintf('x%d',k)); end

14 years ago | 1

Answered
Matlab matrix operations without loops
Try his code, 200 faster YVal = 1:1:100000; M_MAX = 1000; N_MAX = 2000; tic som1=zeros(1,M_MAX+N_MAX); YTemp=zeros(M_M...

14 years ago | 0

| accepted

Answered
array of structures to cell array via comma-separated list
for k=1:size(data,2) out{k}=data(k) end

14 years ago | 1

| accepted

Answered
What does the code: v = poly(1:n); accomplish?
|poly([2 3])=[1 -5 6]| , note that |(z-2)(z-3)=z^2-5z+6| Check this a=poly(2:3) b=roots(a) % *poly* is the inverse...

14 years ago | 0

| accepted

Answered
Matlab matrix operations without loops
You can begin by pre-allocating YTemp=zeros(M_MAX,N_MAX); YVal = 1:1:100000; M_MAX = 1000; N_MAX = 2000; YTemp=zeros(M_...

14 years ago | 0

Answered
Insert a detector block in simulink
Create a file librairy called for example lib1, then copy all the blocks you need from ' *Temporal Operators* ', then add this c...

14 years ago | 0

Answered
issues of Sensitive in 'dir' function
d=dir('*.m'); f1=char(d.name); f=upper(f1); idx=find(cellfun(@(x) isequal(x,upper('Abc.m')),cellstr(f))); out=f1(idx,:)

14 years ago | 0

Answered
Saving variables in the loop.
fid = fopen('file'); line1 = fgetl(fid); res=line1; while ischar(line1) line1 = fgetl(fid); res =char(res,line1) ...

14 years ago | 0

| accepted

Answered
system of nonlinear differential equations
use <http://www.mathworks.com/help/matlab/ref/ode45.html ode45> help ode45

14 years ago | 0

Answered
list values in symbolic function, a simplification problem
Why to not write it like: A = [1 2 3 4]; syms x y; f = A(1)+A(2)*x+A(3)*x+A(4)*x*y

14 years ago | 0

| accepted

Answered
Applying function to signal
function J=yourfunction(I) %write your code %J=...

14 years ago | 0

Answered
Matrix Sortrows by one of it Values
A=randi(10,5,4) value=4 [n,m]=size(A) b=abs(A-value) [jj,jj]=sort(b,2) ii=repmat((1:n)',1,m) idx=sub2ind(size(A),ii,jj) ...

14 years ago | 0

Answered
How to use a matlab code in simulink block?
You can use <http://www.mathworks.com/help/simulink/slref/interpretedmatlabfunction.html Interpreted MATLAB Function>. When yo...

14 years ago | 0

Answered
Why tf2ss and ss(sys) gives different results?
your are using two different function *tf2ss* and *ss*. Also LTI system have an infinite number of state space representation. C...

14 years ago | 0

Answered
is it an array?
If S is not defined, maybe it is a function. Check it by dir s.m

14 years ago | 0

Answered
how to convert string date number to double?
datenum(val) Or Datevec(val)

14 years ago | 0

Answered
Matlab 3D graphing (graph slicing)?
X=1:10 y=x z=cos(x+y) % use your function Plot3(x,y,z)

14 years ago | 0

Answered
how to make pushbutton work fast
In opening function read all your data then use guidata to save your data in handles handles.data=data guidata(hObject,han...

14 years ago | 0

| accepted

Answered
Using stairs to plot 2 functions
Stairs(t,avg) hold on Stairs(t,v)

14 years ago | 2

| accepted

Answered
Why my program always get '0' at initialization?
Your Matlab function is not an integrator, your output signal is 0 or 1 if A(1)==0 out=1; else out=0; end ...

14 years ago | 0

Answered
Matlab Warning: Concatenation of empty arrays
Because c2 and c10, for example, have not the same size, then you can't concatenate them horizontally. Use instead c = [c2 ...

14 years ago | 0

Answered
product of matrix with element by elemnent ,problem is given below...
h=rand(2,20) x=rand(20) y=h*x

14 years ago | 0

Answered
how to compute averge of columns
Out=mean(x)

14 years ago | 0

| accepted

Answered
Discrete filter transfer function (Z domain) time response not matching with analog filter transfer function (S domain) time response
Maybe you did not set correctly the step time and sample time

14 years ago | 0

| accepted

Answered
Creating a counter loop in MatLab, GUI?
set(handles.text8,'string',num2str(a));

14 years ago | 1

Answered
??? Subscript indices must either be real positive integers or logicals.
In the fellowing expression you missed * |x0*(z|, instead of |x0(z| c1=(v0+x0*(z*n+n*sqrt(z.^2-1)))/(2*n*sqrt(z.^2-1)); ...

14 years ago | 1

| accepted

Load more