Answered
Replacing 0 with NaN by indexing into a matrix
data(data(:,10)==0,10)=nan

13 years ago | 0

| accepted

Answered
Creating array from binary sequence, and certainly with the calculation of the dimension
A=randi([0 1],1,30); % your array m=5; % the result will be nx5 n=numel(A); p=n-m+1:-m:1; np=numel(p); B=zeros(np,m); B(...

13 years ago | 0

| accepted

Answered
Download of Matlab elsewhere/..
# Transfer your files to your new laptop # uninstall Matlab from your old laptop # and install a copy of Matlab you bought in ...

13 years ago | 1

Answered
Within a legend, how do I modify where the text is relative to the symbol?
That's what _ do, use two _ _ legend('T__{experiment}')

13 years ago | 0

Answered
Concatenation problem with a loop
X=[1.5 1.7]; D=[]; for k=1:numel(X) D=[D (X(k)*440)*(1:1:ceil(2000/(X(k)*440)))]; end D %or X=[1.5 1.7]; D...

13 years ago | 0

| accepted

Answered
What is the best way to transform a function in a guide?
The best way is to start learning how to use <http://www.mathworks.com/videos/creating-a-gui-with-guide-68979.html Matlab Guide>...

13 years ago | 0

Answered
Matrix transform due to reorder of the equation row number, for AX=b
A= A(:,[2 1 3]) b=b([2 1 3])

13 years ago | 0

| accepted

Answered
Delete value of cell array and shift without just clearing it.
A(ismember(A,'1000'))=[]; %or A(strcmp(A,'1000'))=[] % The fastest %or setdiff(A,'1000')

13 years ago | 0

| accepted

Answered
How can i open a file that the user inputs ?
Read this help fopen help textscan help fprintf

13 years ago | 0

| accepted

Answered
how to do something like A(:,B(:)) ?
nm=size(A) C=A(sub2ind(nm,1:nm(1),B))

13 years ago | 0

| accepted

Answered
Combine two cell arrays containing string values into one.
A = {'1.'; '2.'; '3.'; '4.'; '5.'}; B = {'A'; 'B'; 'C'; 'D'; 'E'}; C=cellfun(@(x,y) [x ' ' y],A,B,'un',0)

13 years ago | 3

| accepted

Answered
indexing a vector by a power
Why are you using |if n = 0:9|. what you need is a for loop

13 years ago | 0

Answered
malipulating matrices...Cramers Rule help
A = [1 3 -8;4 -5 19] B=fliplr(A(:,2:3))

13 years ago | 0

Answered
I want create a pulse in simulink
<</matlabcentral/answers/uploaded_files/173/modelans1.jpg>>

13 years ago | 0

| accepted

Answered
How do I extract numbers from a textscan?
c is a cell array. convert it to double c=cell2mat(c) look at help cell

13 years ago | 0

| accepted

Answered
Exporting data ( numerical and string)
Use <http://www.mathworks.com/help/matlab/ref/fprintf.html fprintf>

13 years ago | 0

Answered
How do I find the even and odd elements in a vector?
*Edit* a=randi([50 100],1,20) evens=a(mod(a,2)==0) odds=a(mod(a,2)==1)

13 years ago | 2

Answered
Convert vector to matrix with used-defined step
v=[1 2 3 4 5 6]; v=[v;v]; v=reshape(v(2:end-1),2,[])' %or simply v=[1 2 3 4 5 6]; v=[v(1:end-1); v(2:end)]'

13 years ago | 0

Answered
Creating non editable uitable
h = uitable('Data',data, 'ColumnEditable',false) If you are using a guide set(handles.uitable1, 'ColumnEditable',false...

13 years ago | 0

Answered
Replace NaN values with blanks
A={nan 1 2 nan 3 'r'} A(cellfun(@isnan,A))={''}

13 years ago | 2

Answered
why did not accept the JPEG image in matlab ?
%Example folder=E:\matlab filename='imag1.jpg' f=fullfile(flder,filename) im=imread(f) If your code is not working, m...

13 years ago | 0

| accepted

Answered
Is there a way to remove tick labels in rose?
you can remove them manually with your figure editor

13 years ago | 0

Answered
Two different graphs!!! Difference between Pi and 3.14
We can explain this: the variation of t is For the first case v=2*pi*0.001*1000; mod(v,pi)=0 % which means the cos will...

13 years ago | 0

| accepted

Answered
Is it possible to install R2007b onto a Windows 7 machine?
Yes you can

13 years ago | 0

| accepted

Answered
Shifting a Square Wave in Matlab
[u,t]=gensig('square',1,5+0.5,0.001) u=u(t>0.5) t=t(t<t(end)-0.5) close plot(t,u,'r')

13 years ago | 0

Answered
multiplying multiple values inside multiple matrices
Maybe this is what you want A=[1 2;3 4] B=[1 2;3 4;5 6] out=cell2mat(arrayfun(@(x) x*B,A,'un',0))

13 years ago | 0

Answered
Can I use a vector as the lower bound index of my summation?
t=1:99; syms s k y=double(subs(symsum(1/(k-1),s+1,100) ,t) ); plot(t,y)

13 years ago | 0

| accepted

Answered
Using the fzero function
Declare Ko and S as global function [m] = mzero(x) global Ko S r=0.1; Ts=1; t=0; ... call your function global...

13 years ago | 0

Answered
Inputs in Simulink model....
Use a <http://www.mathworks.com/help/simulink/slref/constant.html constant block>

13 years ago | 0

| accepted

Answered
how to find z transform of a random sequence?
h=randi(10,1,500); syms z zz zz=1; H=0; for k=1:numel(h) zz=zz*z^-1; H=H+h(k)*zz; end %or maybe h=randi(20,...

13 years ago | 0

| accepted

Load more