Beantwortet
How to do calculation on time values imported from Excel?
If a is your array a=[0.8153 ,0.2944,0.4792,0.8208,0.2917] out=datestr(a,'HH:MM:SS')

mehr als 10 Jahre vor | 0

Beantwortet
add colums in a cell array of strings
s={'674' '719' '618' '631' '618' '631' '618' '631' '618' '674'} out=repmat({''},1,19) out(1:numel(s))=s

mehr als 10 Jahre vor | 0

Beantwortet
index must be a positive integer or logical
when you write p(i), make sure that i is a positive integer, not equal to 0. in your case, you have p(i-1), if i is equal to 1,...

mehr als 10 Jahre vor | 0

Beantwortet
how to add disturbance factor ?
* Use these a <http://www.mathworks.com/help/simulink/slref/clock.html clock block> to generate a time t, * multiply the time ...

mehr als 10 Jahre vor | 1

Beantwortet
Substitute numbers in array
X=[1 2 3 4 5 6 7 8] XX=[fliplr(X(1:4)) fliplr(X(5:end))]

mehr als 10 Jahre vor | 0

Beantwortet
how to change decimal places after point
v={'data_70.000_32.125';'data_70.124_32.120';'data_74.120_32.123'} w=cell(size(v)) for k=1:numel(v) a=regexp(v{k},'_','...

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
Matlab confirm is input is not an array
n = input('Enter in a positive integer: ') while n<0 | numel(n)>1 | fix(n)~=n n = input('Enter in a positive integer: ')...

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
Sorting elements of a matrix ignoring NaN
have = [5 NaN 4 9; 4 0 NaN 9; -6 NaN 2 3; 1 7 NaN -3] idx=isnan(have) [n,m]=siz...

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
How to multiply the constants of a symbolic vector?
r = 2 p = sym('p', [1 r]) syms k a =prod(p)

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
How can I combine data from multiple cells into one matrix?
A={rand(4,23) rand(5,23) rand(10,23)} B=cell2mat(A')

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
Plot window is coming up blank. Why?
t = 0:0.01:10; vs = 3.*exp(-t /3).*sin(pi*t); vl=vs; vl(vs<=0)=0; plot(t,vl)

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
Matrix dimension must agree
There are many mistakes in your code fc=[10 30]; the size of fc is [1 2], then fc(i,:) is not defined for i=2. also ...

mehr als 10 Jahre vor | 0

Beantwortet
Split 3d array into 'i' equal mat files
v=rand(4,6,8) for ii= 1:6 filename=sprintf('my_data%d.mat',ii); s=v(:,ii,:) save(filename,'s'); end

mehr als 10 Jahre vor | 0

Beantwortet
How to delete repeated elements in column
D={'Run' '' 'play' ''; '' 'go' '' 'sit' ; 'Run' '' 'play' ''; '' 'go' ''...

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
Can any one help me to correct this code
function h=dd1(n) h=zeros(1, length(n)); % n = [1 2 3 4 5 6 7]; % What this line is doing here? h(n==0) = 1; The call ...

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
Compare two strings, in different length, in two data sets in MATLAB, using if loop.
v={'ct' 12;'er' 14 ;'ct' 20 ; 'gf' 45 ;'ct' 78 ; 'er' 47} [ii,jj,kk]=unique(v(:,1)) out=[ii accumarray(kk,(1:numel(kk))',[]...

mehr als 10 Jahre vor | 0

Beantwortet
Hi friends.I have a problem.There is error that is index must be integer or logical.
You can't write y(0), Matlab does not allow index equal to zero. the index should be positive integer

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
Read a txt file with engineering format
What kind of trouble? try this filename = 'Source.txt'; format long [B,delimiterOut]=importdata(filename);

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
All Possible combinations of rows
[ii,jj]=meshgrid((1:s1),(1:s2)); v=[ jj(:) ii(:) ones(s1*s2,1)]';

mehr als 10 Jahre vor | 0

Beantwortet
Merging text files into one
s=[ 'copy ' sprintf('0906%d.txt+',15:22)] s(end)=[] system(s)

mehr als 10 Jahre vor | 0

Beantwortet
Why I get this Error (State Space)?
Your diagram doesn't match your equation, you should have B*[dxr;xr]

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
Filter the rows of a matrix based on the values of one column
idx=ismamber(A(:,1),B) C=A(idx,:)

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
How I can write this in MATLAB ?
n=1:20 x=3*(-1/4).^n stem(n,x)

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
what is the problem with this code ?!!
syms n z a = ztrans(3*(-1/4)^n); b=subs(a,1:20) subplot(2,1,1) stem(b)

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
Why Ramp block output is continuous even when a discrete solver is chosen?
You can choose how your scope displays your plot. change the parameters of your scope, in "style,line": choose "no line".

mehr als 10 Jahre vor | 0

Beantwortet
xlsread returns empty when reading a cell with a formula
[num,text,both] = xlsread('h&vlookup_if_and_or_Capacity_Planning.xlsx','Sheet1','B26','basic')

mehr als 10 Jahre vor | 0

Beantwortet
Reading a *.txt document and extracting specific words/phrases
filetoread ='yourfile.txt'; fid = fopen(filetoread) k=1; v=cell(1,1) while 1 tline = fgetl(fid); ...

mehr als 10 Jahre vor | 0

Beantwortet
removing zeros from matrix
v=[0 0 2 3 4 0; 1 0 2 0 0 1; 3 2 1 0 0 0; 0 1 0 3 0 1] out=reshape(v(v~=0),size(v,1),[])

mehr als 10 Jahre vor | 1

Beantwortet
How to delete an element of a vector?
v=[1 10 3 4 10] w=v(v~=10) %or v(v==10)=[]

mehr als 10 Jahre vor | 1

| akzeptiert

Beantwortet
Covert a cell to multidimensional matrix
%------------Example--------------------------- s=arrayfun(@(x) randi(5,randi(5),100),1:5,'un',0) %---------------the code--...

mehr als 10 Jahre vor | 0

| akzeptiert

Mehr laden