Respondida
Dots!, Dots!, Dots! What are they doing!?
When your expression is too long, you can write it in multiple lines

alrededor de 11 años hace | 1

Respondida
Split a matrix in rows according to a vector
x=cumsum(B)-B+1 y=cumsum(B) out=arrayfun(@(ii,jj) A(ii:jj,:),x,y,'un',0)

alrededor de 11 años hace | 0

Respondida
How I can get a vector from another through swaps?
Do you mean randomly? A=[1 5 8 7 4 3 2 6] B=A(randperm(numel(A)))

alrededor de 11 años hace | 0

Respondida
how to write values to excel sheet
Can you give more details about your arrays, are they same size? What about the names? maybe you should save all your result in ...

alrededor de 11 años hace | 0

Respondida
how to calculating hourly average?
v=randi(9,1,55) % Example n=ceil(numel(v)/10)*10 v(end+1:n)=nan a=reshape(v,10,[]) idx=~isnan(a) for k=1:size(a,2) o...

alrededor de 11 años hace | 0

| aceptada

Respondida
Split components of a symbolic vector into positive and negative
syms x1 x2 y1 y2 X=x1^2*y2^5 - 2*y1^2*x1*x2+ 3*x1 -y2 [s1,s2]=coeffs(X,[x1,x2,y1,y2]); idxp=s1>0; Xp1=s2(idxp); Xn1=s...

alrededor de 11 años hace | 0

Respondida
Find the index of the last numeric element of a column including NaNs
find(~isnan(fliplr(x)),1)

alrededor de 11 años hace | 0

Respondida
Getting Error: Unexpected MATLAB expression.
syms alpha beta gamma real % write down the rotation matrices using the symbolic parameters alpha, beta, gamma R_B1 = [1,0,0...

alrededor de 11 años hace | 0

Respondida
calculate statistics every quarter of an hour on time series data
x=datenum('2015-01-01 00:00:0'):1/(24*12):datenum('2015-01-01 2:00:0') y=datestr(x,'yyyy-mm-dd HH:MM:SS') D = datevec(y,'yyy...

alrededor de 11 años hace | 0

Respondida
How to plot .bin file?
Use <http://www.mathworks.com/help/matlab/ref/fread.html fread function> to read your file and <http://www.mathworks.com/help/ma...

alrededor de 11 años hace | 0

Respondida
How to select a data set from columns having using criteria?
v=[time A B C acc ]; idx=v(:,5)<10&v(:,4)<20; out=v(idx,:) Time_criteria=v(find(idx,1),1)

alrededor de 11 años hace | 0

Respondida
how can I solve this equation? I am trying with 'solve' function but getting error [ empty sym ]
eq='2.82167 - 0.0092752*(T_f - 216.65)*(5.94429e-11*(0.387*(4.12514e8*T_f - 8.93711e10)^(1/6) + 0.6)^6 - 0.0123334)^(1/3) ...

alrededor de 11 años hace | 0

Respondida
How can I divide multiple matrices into individual arrays?
A = [1, 2, 3; 4, 5, 6; 0 0 0]; B = [3, 2, 1; 6, 5, 4; 0 0 0]; out=arrayfun(@(x,y) [x,y],A,B,'un',0); out=out(:); Now you...

alrededor de 11 años hace | 1

| aceptada

Respondida
how to create a 1,12,123,1234 pattern in a triangle
n=5 out=arrayfun(@(x) str2num('1':num2str(x)),1:n)'

alrededor de 11 años hace | 1

Respondida
Control "Delay" block by setParam?
set_param('untitled/Delay','DelayLength','2')

alrededor de 11 años hace | 0

| aceptada

Respondida
Is it possible somehow make vector of structure?
a=rand(1,10); b=rand(1,10); s=struct('field1',num2cell(a),'field2',num2cell(b))

alrededor de 11 años hace | 0

Respondida
Help importing mixed data
s=importdata('myfile.aspx') date=s.textdata num=s.data num=num(:,2)

alrededor de 11 años hace | 0

| aceptada

Respondida
How do I include zeros when converting from an integer to a string?
a=1234 b=sprintf('00%d',a)

alrededor de 11 años hace | 1

Respondida
Create a table from symbolic vectors
G=sym('x',[1,6]) H=num2cell(G) table(H{:})

alrededor de 11 años hace | 0

Respondida
Legend- if plot is empty?
x=nan and y=nan is not an empty plot. x1=[1 2 3] x2=[] y1=[1 2 3] y2=[] x={x1,x2} y={y1,y2} for k=1:numel(x) if...

alrededor de 11 años hace | 2

Respondida
spliting date and time strings in a table
data={'23/06/2015 00:50:12';'24/06/2015 12:30:45';'25/06/2015 13:00:01'} a=datevec(data,'dd/mm/yyyy HH:MM:SS') date=datestr(...

alrededor de 11 años hace | 1

| aceptada

Respondida
Basic equations from excel to matlab?
If A is your matrix A=rand(4,130), % Example CI= 87, DP=120, DV=126 out=A(:,CI)+A(:,DP)/2+0.4095*(A(:,DV)-3.44/2)-(A(:,...

alrededor de 11 años hace | 0

| aceptada

Respondida
How to use 'Switch case' with Matlab Function Block in Simulink?
What if n is different from 1 and 2? Try this function result = fcn(n) %#codegen x = 3; y = 2; z=0; switch n case...

alrededor de 11 años hace | 0

Respondida
How to loop string files with the help of xlswrite to write on new areas of same sheet an excel file
ii=2, jj=3, range=sprintf('A%d:C%d',ii,jj)

alrededor de 11 años hace | 0

| aceptada

Respondida
how to convert 1100111 to 1 1 0 0 1 1 1
a={'11100';'10000';'10101'} out=cell2mat(cellfun(@(x) x-'0',a,'un',0))

alrededor de 11 años hace | 0

Respondida
Solve a matrix-form equation
s=sum(Constants(:,1) .* (100/333).^Constants(:,2) .* x.^Constants(:,3) ) sol=solve(s)

alrededor de 11 años hace | 0

| aceptada

Respondida
Why this error is coming in my code?
There are many problems in your code The first line: zeros(1500,2); What this line means? then after you wrote ze...

alrededor de 11 años hace | 0

Respondida
inverse of sinc function : how to evaluate?
Use this syms x sol=double(solve(sinc(x)==0.11))

alrededor de 11 años hace | 1

Respondida
min and max of a vector
A=randi(20,1,20) B=randi(20,1,20) C=randi(20,1,20) D=randi(20,1,20) E=[A.*C;A.*D;B.*C;C.*D] min(E)

alrededor de 11 años hace | 0

Respondida
Find the highest value and its entry of a (2xn) matrix in each column
v=[17 23 4 10 11; 24 5 6 12 18] [a,idx]=max(v)

alrededor de 11 años hace | 0

| aceptada

Cargar más