답변 있음
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')

대략 10년 전 | 0

답변 있음
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

대략 10년 전 | 0

답변 있음
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,...

대략 10년 전 | 0

답변 있음
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 ...

대략 10년 전 | 1

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

대략 10년 전 | 0

답변 있음
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},'_','...

대략 10년 전 | 0

| 수락됨

답변 있음
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: ')...

대략 10년 전 | 0

| 수락됨

답변 있음
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...

대략 10년 전 | 0

| 수락됨

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

대략 10년 전 | 0

| 수락됨

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

대략 10년 전 | 0

| 수락됨

답변 있음
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)

대략 10년 전 | 0

| 수락됨

답변 있음
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 ...

대략 10년 전 | 0

답변 있음
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

대략 10년 전 | 0

답변 있음
How to delete repeated elements in column
D={'Run' '' 'play' ''; '' 'go' '' 'sit' ; 'Run' '' 'play' ''; '' 'go' ''...

대략 10년 전 | 0

| 수락됨

답변 있음
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 ...

대략 10년 전 | 0

| 수락됨

답변 있음
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))',[]...

대략 10년 전 | 0

답변 있음
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

대략 10년 전 | 0

| 수락됨

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

대략 10년 전 | 0

| 수락됨

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

대략 10년 전 | 0

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

대략 10년 전 | 0

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

대략 10년 전 | 0

| 수락됨

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

대략 10년 전 | 0

| 수락됨

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

대략 10년 전 | 0

| 수락됨

답변 있음
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)

대략 10년 전 | 0

| 수락됨

답변 있음
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".

대략 10년 전 | 0

답변 있음
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')

대략 10년 전 | 0

답변 있음
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); ...

대략 10년 전 | 0

답변 있음
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),[])

대략 10년 전 | 1

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

대략 10년 전 | 1

| 수락됨

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

대략 10년 전 | 0

| 수락됨

더 보기