Beantwortet
create 3-dimension matrix
c=cat(3,z1,z2)

mehr als 11 Jahre vor | 1

Beantwortet
binary matrix that has different orders of 0 and 1
n=3 out=dec2bin(0:2^n-1,n) %or out=dec2bin(0:2^n-1,n)-'0'

mehr als 11 Jahre vor | 3

Beantwortet
How to normalize a matrix such that the maximum value is 1?
If you have Image Processing Toolbox new_y1=mat2gray(y1); new_y2=mat2gray(y2); % new_y1 and new_y2 have both the same m...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
How to extend a array by multiplying internal values e.g. [1 2 3 4] to [1 1 1 2 2 2 3 3 3 4 4 4]?
A = [1 2 3 4 5 6 7] B=bsxfun(@times,ones(4,1),A); out=B(:)'

mehr als 11 Jahre vor | 0

Beantwortet
Convert char to cell
ze1=struct('Nome',[],'Aperlido',[],'Categoria',[],'Numero',[],'Mail',[],'Telefone',[]) ze1.Nome{end+1}=input('Introduza o seu...

mehr als 11 Jahre vor | 0

Beantwortet
Sorting data extracted from the name of a group of files
coord=cell2mat(cellfun(@str2double,regexp(files,'(?<=(x\+)|(y_\+))\d+(\.\d+)?', 'match'),'un',0))

mehr als 11 Jahre vor | 0

Beantwortet
How do i solve equations for 2 unknowns?
syms X Y X1 X2 Y1 Y2 T1 T2 V sol=solve(V*T1==sqrt((X1- X )^2+(Y1- Y )^2),V*T2==sqrt((X2- X )^2+(Y2- Y )^2),X,Y)

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
How to extract information from the name of a file without using strsplit function?
files=[{' x+0.000mm_y_+0.000mm_z_+0.000mm.dat_ '} {' x+10.000mm_y_+20.000mm_z_+30.000mm.dat_ '}] coord = regexp(files,'\d+(\...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
the number of occurences of each character of one string,in another
str='MEQNGLDHDSRSSIDTTINDTQKTFLEFRSYTQLSEKLASSSSYTAPPLNEDGPKGVASAVSQGSESVVSWTTLTHVYSILGAYGGPTCLYPTATYFLMGTSKGCVLIFNYNEHLQTILVP...

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
Get structure elements across fields
Another way: d=struct('f1',num2cell(randi(10,1,10)),'f2',num2cell(randi(10,1,10)),'f3',num2cell(randi(10,1,10))) n=4 e=d(n...

mehr als 11 Jahre vor | 0

Beantwortet
I needed matlab code for cumulative sum of column vector
yourarray=[1 2 3 4 5] out=cumsum(yourarray)

mehr als 11 Jahre vor | 0

Beantwortet
How to find zero on plot?
x=[1 2 0 3 4 5 3 2 0 4 5] out=find(x==0)

mehr als 11 Jahre vor | 0

Beantwortet
Help comparing two matrices
sign(m1-m2) % Example m1=[1 4;10 20] m2=[0 2;10 40] out=sign(m1-m2)

mehr als 11 Jahre vor | 1

Beantwortet
How can I get a desired input? Also, why does 1 = 49 and 2 = 50 etc. Anyway to keep there values?
N=input('Enter your student number:'); if N>0 disp('Sum of digits:') disp(sum(num2str(N)-'0')) end

mehr als 11 Jahre vor | 0

Beantwortet
How to get matlab import to see col with nan as number
d=importdata('import_test.csv') h=d.textdata; header=h(1,:) yourdate=h(2:end,1) YourData=d.data %or [a,b,c]=xlsr...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
Plotting a colored surface in 2D
Look at this example x=1:0.1:4 y=1:0.1:4 [X,Y]=meshgrid(x,y) Z=sin(X).^2+cos(Y).^2 surf(X,Y,Z) view(2)

mehr als 11 Jahre vor | 8

| akzeptiert

Beantwortet
How can i fix it?
YourFolder='E:\matlab' for k=1:10 FileName=sprintf('pic%d.jpg',k) File=fullfile(YourFolder,FileName) % do ...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
How to refresh the data in polar plot
x = linspace(0,8); y = sin(x); [theta,rho] = cart2pol(x,y) h=polar(theta,rho,'--r') h.YDataSource = 'y'; y = sin(x.^3); ...

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
Deleting zeros from cell matrix without resizing or reshaping matrix
a={ 1 2 6 2 6 6 1 0 0;1 7 2 5 0 6 4 7 1;3 2 0 2 6 7 4 7 3 } a(cellfun(@not,a))={[]}

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
how to leave a variable on one side of the equation
s='-3*a+2*b==10*sin(c)' out=solve(s,'b')

mehr als 11 Jahre vor | 1

Beantwortet
xPC Target related query
That depends on the version of your Simulink. Lunch your Simulink, then under Simulink Real Time (or formerly XPc Target) click...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
Change a character array to time
s='113203' a=datenum(s,'HHMMSS') out=datestr(out,'HH:MM:SS')

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
plot using with characters which are cell and numeric data.
data=[1;2;3;4;5;6] ids={'12.1a';'1.2b';'1.3c';'1.4d';'1.7e';'1.8f'} plot(data,'b') set(gca,'XTick',1:numel(ids)) set(gca,'...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
finding the derivative of a graph
Example t=0:0.1:10 y=t.^2 dy=gradient(y,t) subplot(211); plot(t,y) subplot(212) plot(t,dy)

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
color plotting matlab yellow
plot(x1,'y') %or plot(x1,'color',[1 1 0]) Read the <http://www.mathworks.com/help/matlab/ref/plot.html plot do...

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
I am trying to create a table but somehow can't.
What those 3 dots are doing? T = table (Time,Sx,Sy,'RowNames',LastName);

mehr als 11 Jahre vor | 0

Beantwortet
A question about for loop
p=[.5 .7 .2]; idx=nchoosek(1:3,2) out=0; for k=1:size(idx,1) m=setdiff(1:3,idx(k,:)); out=out+p(m)*(1-p(idx(k...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
Help comparing two matrices
idxp=A>B idxn=A<B C=zeros(size(A)) C(idxp)=1; C(idxn)=-1

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
Exracting n characters from all elements of cell array
date1=datestr(date_time,'dd/mm/yyyy') hour1=datestr(date_time,'HH:MM:SS')

mehr als 11 Jahre vor | 0

| akzeptiert

Mehr laden