Pregunta


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. ...

alrededor de 8 años hace | 1 respuesta | 0

1

respuesta

Respondida
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) ...

alrededor de 8 años hace | 1

Pregunta


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 ...

alrededor de 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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 ...

alrededor de 8 años hace | 1 respuesta | 0

1

respuesta

Respondida
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]; ...

más de 8 años hace | 1

| aceptada

Respondida
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]...

más de 8 años hace | 0

| aceptada

Respondida
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...

más de 8 años hace | 0

Pregunta


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...

más de 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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...

más de 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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

más de 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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...

más de 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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

más de 8 años hace | 2 respuestas | 0

2

respuestas

Pregunta


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 =...

más de 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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... ...

más de 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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...

más de 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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...

más de 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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))

más de 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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 ...

más de 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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...

más de 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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

más de 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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)); ...

más de 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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...

más de 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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(:,:,...

más de 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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 (...

más de 8 años hace | 2 respuestas | 0

2

respuestas

Pregunta


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 ...

más de 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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...

más de 8 años hace | 2 respuestas | 0

2

respuestas

Pregunta


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

más de 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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

más de 8 años hace | 1 respuesta | 0

1

respuesta

3

respuestas

Cargar más