Question

How would i display a matrix as a graph?

I have a matrix in which the values are mainly in the main diagonal. What i want to do is create a bigger matrix in which each r...

1 year ago | 1 answer | 0

Question

How to save variables and put them in a vector

I have this code in which i input a value, let's call it x. The code runs, and afterwards it stores a value called y. For each d...

1 year ago | 1 answer | 0

Question

How to take the average of the columns of a matrix and insert into a column matrix

I have a piece of code that reads a .txt file with several matrices and sorts them into cell arrays. Each of the matrices has al...

1 year ago | 1 answer | 0

Question

How to take the average of the columns of a matrix and insert into another matrix

I have a piece of code that reads a .txt file with several matrices and sorts them into cell arrays. Each of the matrices has al...

1 year ago | 1 answer | 0

Question

Calculate distance between two coordinates with depth

I need to do what's in the title. I saw a file exchange about calculating the distance between two coordinates, but how would i ...

1 year ago | 1 answer | 0

Question

Plotting numbers of main diagonal

I have a matrix that in the main diagonal has values that vary slightly from 1, almost an identity matrix. How would i plot a gr...

1 year ago | 1 answer | 0

Question

how do i use different parts of a variable for the same code?

I have this code in which i have to calculate the Gn variable shown below for two different iterations. In each iterati...

2 years ago | 2 answers | 0

Question

How to position groups of matrices inside a bigger matrix

I have a program in which I have some matrices of varying size that runs through a piece of code, for the current moment i only ...

2 years ago | 1 answer | 0

Question

How do i get the output for each iteration of code?

I have a program in which i run two matrices through the same code and they give me an output for each iteration(the iteration i...

2 years ago | 1 answer | 0

Question

How do i calculate the inverse of a non-square matrix?

I have a 4x3 matrix(S) and i want to calculate the inverse of it, the matrix is: S= 1.7530 0 0 ...

2 years ago | 1 answer | 0

Question

How do i make different matrices run through the same code?

I have a program that runs a matrix through it. Now i want another matrix to run through it in a loop so that the first one runs...

2 years ago | 1 answer | 0

Question

How would i run different events from the same .txt file?

I run a program that uses the following information of a .txt file 4 0 0 1 1 1 3 1 1 2 3 1 3 2 1 in which th...

2 years ago | 1 answer | 0

Question

How would i store data into a vector

What i want to do is create a vector with only 1's that has a varying size depending on how i want it to be, since i know dynami...

2 years ago | 1 answer | 0

Question

How would i generalize the following variables

I want to generalize the following variables dat=norm(A(:,5)-A(:,1)); dbt=norm(A(:,5)-A(:,2)); dct=norm(A(:,5)-A(:,3)...

2 years ago | 1 answer | 0

Question

How do i create a program that, depending on the input value would create more or less variables

I have the following code i did for calculating location of earthquakes based on the information of different stations, it isn't...

2 years ago | 1 answer | 0