Answered
Remove numbers from a cell array of length n = 10963
If A is your array A={1:3 -1:5} out=cellfun(@(x) x(x~=-1), A,'un',0)

13 years ago | 0

| accepted

Answered
split string into 3 letter each
str ='AGTCTGTCTTTG'; a=cellstr(reshape(str,3,[])') What is the aim of the replacement ? you can create v={'J','U','N'...

13 years ago | 5

| accepted

Answered
What does the "seed" parameter in Uniform Random Number generator change in the block's behaviour?
Every time you run your simulink model, for a constant seed, the block generate the same sequence of random numbers. If you want...

13 years ago | 0

| accepted

Answered
How can I know the Difference between two signals??
d=y1-y2 |d| is also a signal with the same size as y1 and y2. If you have another definition of a difference, post it. ...

13 years ago | 0

Answered
I am having Permission Issue with imwrite.
Change the folder to |D:\...| or |c:\users\...|

13 years ago | 0

Answered
How to define a symbolic vector
a=sym('a',[1 10])

13 years ago | 0

| accepted

Answered
Matching rows in different matrices
array = [0 0.06 .12 .18 .24 ]; v=[0 0 0 0 0.06 0 0.12 0 0.18 0 0.24 0] w=un...

13 years ago | 0

Answered
periodic function with n cycles
t1=0:.01:pi/3; t2=pi/3:.01:2*pi/3; A=sqrt(3) + sin(t1*2*pi- 2*pi/3); B=sin(t2); t=[t1 t2], y=[A,B] plot(t,y) m=5 % Re...

13 years ago | 3

Answered
How to avoid log(0) within an area plot?
Y(~Y)=1 plot(y) set(gca,'yscale','log')

13 years ago | 1

Answered
How do I increase the space between trains in this periodic waveform
t = 0 : 1/50E3 : 10e-3; spac=3e-3 spac_vect=0 : spac : 10e-3 % vector of delays amp_vect=0.8.^(0:numel(spac_vect)-1) % ve...

13 years ago | 0

| accepted

Answered
How to use the power operator in xlabel?
xlabel('A*R^2^/^3^ m^8^/^3')

13 years ago | 3

Answered
third order differential equation
Save this function as myfcn.m function dx=myfcn(t,x) dx=zeros(3,1) m=50; c=50 ; k=1000; dx(1)=x(2); dx(2)=x(3); dx(3...

13 years ago | 0

Answered
Why is Cube root of 64 not equal to 4
A=64; B=4; if B^3==A fprintf('success') else fprintf('fail') end Look at <http://matlab.wikia.com/wiki/FAQ#W...

13 years ago | 1

| accepted

Answered
How can I read a matrix contain '?'
fid=fopen('filename.txt') d=textscan(fid,'%s') fclose(fid) out=strrep(d{1},'?','0')

13 years ago | 0

Answered
how to change part of a matrix into zero
n1=ceil(0.1*size(A,1)); A(1:n1,:)=0

13 years ago | 2

| accepted

Answered
A\b doesn't work
b is a column vector b=b' x=A\b

13 years ago | 1

Answered
Plotting line with marker
Example x=0:999; y=sin(0.01*x); plot(x,y) hold on scatter(x(1:10:end),y(1:10:end),'r') hold off

13 years ago | 1

Answered
Is MATLAB 7.9.0 (R2009B) compatible with realtime workshop
Maybe you are using a 64 bit os, in this case you need to install <http://www.mathworks.com/matlabcentral/answers/101105 Microso...

13 years ago | 0

| accepted

Answered
How to plot a text data column from an excel file in MATLAB?
Thre is no x-axis data in your Excell file Yaxis = xlsread (filename,Sheet); plot(Yaxis)

13 years ago | 0

Answered
how to assign new axis for a graph
Use |plot| and |hold on|

13 years ago | 0

Answered
Taking derivative of a time based function?
T = 8; n = 1; t = 0:0.1:100; y = ((t/T).^n).*exp(-t/T); x = diff(y)./diff(t); plot(t,y,t(1:end-1),x) % or use gradient...

13 years ago | 0

Answered
How do I eliminate strings with length < 3 from cellarray
days = {'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'}; abbrev = days(cellfun(@numel,days)>=3)

13 years ago | 0

| accepted

Answered
Replacing non-integer values
a(ceil(a)~=a)=0

13 years ago | 1

Answered
MY ODE is giving two solutions
y = dsolve('Dy = (1+2*t)*sqrt(y)', 'y(0)=1.0') t=0:0.25:5; out=subs(y,t) plot(t,out)

13 years ago | 0

| accepted

Answered
Suppose i have points ( 0.9, 79, 76,23, 1, 3, 4.3,89), what is the slope of the line formed by this points
These points don't form one line. Maybe you need to use a curve fitting toolbox to fit a function ax+b

13 years ago | 0

Answered
How can I append zero & 1 (low & high level) with a pulse in Simulink?
Try <http://www.mathworks.com/help/simulink/slref/repeatingsequencestair.html Repeating Sequence Stair>

13 years ago | 0

| accepted

Answered
MATLAB export cell array to csv file
you should concatenate like this ToCSV=[ToCSV; {'EastLocation' 0.5 1e+3 1e+4 1e+2} ];

13 years ago | 0

| accepted

Answered
how to plot red of the matrix
a = [1 1 0; 0 0 0; 0 0 1;]; [I,J]=find(a==1) scatter(I,J)

13 years ago | 0

Answered
i need some help on matrix operations!
a=[1 0 1 1]; v=[2 3 4 5]; idx=find(a); n=numel(idx); ii=cell2mat(arrayfun(@(x) circshift(idx,[0 -x]),(1:n)','un',0)); s=s...

13 years ago | 0

Answered
how to randomly generate an alphabet within a given range ?
s='A':'J' str=s(randi(numel(s)))

13 years ago | 2

| accepted

Load more