Frage


How to interchange values in matrix
I want to interchange matrix. A = [ 1 5 5 2 5 3 5 4 9 7 8 6 6 4]; i want it to interchange with with last unique value. ...

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Beantwortet
how to generate symmetric matrix with zero-one elements, complexity index of this matrix (number of ones / (size )^2) = any number from zero to 1 and diagonal equal ones
A = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5]; symmetry = [A, flip(A)]; if you need diagonal as ones use B =diag(symmetry) ...

fast 9 Jahre vor | 1

Frage


How to swap row elements by increasing and decresing order.
p = [30 30 30 30 30 30 0 0 0 0 0 0 0 0 30 30 30 30 30 30] I want to swap it like [30 30 30 30 30 30 30 30 30 30 30 30 0 0 0 ...

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to swap matrix ?? Anyone can help me to improve my code.?? I want 12No of 30's & 8 Nos of 0's in every iteration.
M=[30 30 30 30 30 30 0 0 0 0 0 0 0 0 30 30 30 30 30 30]; p = M(:,:,1); Np = length(M); for p = Np/2: -1:2 ...

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Beantwortet
Difficulty Coming up with a solution, would there be a convenient command for this ??
I don't know what is your "m1". As i understand. following should be help you Matrix = [1; 2; 3; 4; 5; 6; 7; 8; 9; 10]; ...

fast 9 Jahre vor | 1

| akzeptiert

Beantwortet
how do I get the cumulative sum of integrals after for loop?
sum(sum(sa(:,:,:))) or you could find sb by % N and K could have any number of elements K = [2 5]; % K = [2 5 6.2 1.5]...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
how to numerical solve d2y/dx2+f(x)dy/dx+y=0 in matlab. if f(x)=x^2+2x+1
syms x y; f=x^2+2*x+1; df= diff(f); d2f = diff(df); solution = d2f + f *(df) + y; i don't know whya re a...

fast 9 Jahre vor | 0

Frage


How can setup optimset for custom data types.
<</matlabcentral/answers/uploaded_files/42434/Capture.JPG>> I'm putting xo as initial guess. I want custom data just restrict...

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How can i find layer number?? After calculating min(:) and max(:). I want to know layer number for layer calculation in Lakhs of layer.
>> ta1 ta1(:,:,1) = -0.0207 ta1(:,:,2) = -0.0209 ta1(:,:,3) = -0.02...

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How can i write x ∈ A
B = [30 60 30 60 60 30]; [No,Th] = hist(B,unique(B)); A = Th; i want to right in other program x ∈ A

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How can i bound initial guess during optimization
i have initial Guess A= [ 0 30 0 30 30 30 30 30]; i don't want compiler take other values than 0 or 30. It should change o...

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to multiply 4D array.
i want to multiply L(:,:,k,:).*M(:,:,k,:); i want to multiply without loop.

fast 9 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


How to store multiple array. or multidirection array.
p = [15 30 45 60 75 90 75 60 45 30 15 30 45 60 75 90 75 60 45 30]; N1 = 10; randidx = randi(numel(p), [1 20 N1]); p =...

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to create discrete variable??
I have to create discrete matrix A(:,:,k) = [a b c d e f g h i j k l m n o p]; for k= 1:N i want to allocate a b c... ...

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How can I generate symmetric array?
I have an array. and i want to write it symmetry A(:,:,k) = [ 1 2 3 4 5 6 7 8 9 10]; I want to write it as A(:,:,k...

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How can i assign variable in program.
a = [a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20]; assignin('base','a1',x(1)); assignin('base...

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


how to print variables in command window with message
A=[1, 3,4] I want to print size of A is length(A) and A is print(A , length(A))

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to make series.
I want to create series [1,2,3,...] upto N numbers. When i put N=50 its display 1,2,3,4....upto 50.how can i write this from 1 ...

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How can use "is not equal to" command in matlab? and how terminate or cancel if else??
if i want to restrict variable length(a) "is not equal to" length(b); length(c) "is not equal to" length(a); then te...

etwa 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How can i input matrix array
x(1,:,:) ans(:,:,1) = 10 10 10 ans(:,:,2) = 5 5 5 ans(:,:,3) = 2 2 2 ans(:,...

etwa 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How can sort permutations.
Please help me to solve it A=[30 30 30 30 30 30 60 60 60 60 60 60 60 60 30 30 30 30 30 30]; [c,b] = hist(A,unique(A)); ...

etwa 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


Have any command for copy variable without loop.
A=[1; 2; 3]; B=[4, 5, 6]; for k = 1:20 c(:,:,k) = A; d(:,:,k) = B; end I want to ca...

etwa 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


Command for perfect matrix multiplication. Command gives perfect size of matrix
Ts Ts(:,:,1) = 0.5000 0.5000 1.0000 0.5000 0.5000 -1.0000 -0.5000 0.5000 0 Ts(:,:,...

etwa 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to display Numbers of stacking sequence using permutations an combinations. in this case i have 6840 permutations and 1140 combinations. perms(a) command returning error
a=[45 45 45 45 45 45 0 0 0 0 0 0 0 0 -45 -45 -45 -45 -45 -45]; % No. of angle =20; % No. of sub angle =3 Means (...

etwa 9 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


How to find 'numbers' of unique variable in matrix. How many quantity of variables.
x=[2 5 2 52 5 25 2 5 2 22 5 2 5 52 5 55 4 5 5 2 5 5 25 2 5 2 54 5 54 5 2 5 5 5 5 5 5 5 25 2 255 2 5 5 2 55 2 5 5 2 5 5 2 255 2 ...

etwa 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


I have 3*1 matrix in form of cell or string. I have to convert into mat. i have to convert into 3*1*20
Tcur = Columns 1 through 2 [3x1 double] [3x1 double] Columns 3 through 4 [3x1 doub...

etwa 9 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


Where i find complete list of matlab commands and functions. Specially array manipulations
Where i find complete list of matlab commands and functions. Specially array manipulations

mehr als 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to integrate equation in Matlab? is it necessary to put values for each variable?
R=int((1/(a*(x*d+b)^n))+c) with respect of x. please tell me how to integrate using matlab

mehr als 9 Jahre vor | 1 Antwort | 0

1

Antwort

3

Antworten

Mehr laden