Respondida
How can I call some line in an excell file ?
"I want the file from line 19" -- What does this mean? Is there a file name on line 19? (Sorry but I can't open files on this de...

más de 7 años hace | 0

| aceptada

Respondida
formatting string with vectors
You will probably have to run a for loop, but I usually like to just concatenate a string when I put in variables. if true ...

más de 7 años hace | 0

Pregunta


Importing ascii data with mixed in headers
I have an old program that creates ascii files with data in a format similar to the below: Header line Set 1 Parameter 1 1...

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

1

respuesta

Respondida
How can i remove an entire row or column of a matrix if the elements of the matrix in the row or column of the matrix has been flagged with a certain number?
You can use smart indexing to complete this, but you're going to have a challenge with different size matrices if you aren't car...

casi 8 años hace | 0

Respondida
combine matrix and vector
I would suggest building this into a structure array. It might take a bit more manual input, but you can set it up so that you h...

casi 8 años hace | 0

Respondida
Why is this for loop not producing unique values for each index of the calculated matrix?
After expanding and simplifying your equations I can safely say that when Vavg^2 is used then Davg(i) = 94.753... because you ar...

casi 8 años hace | 0

Respondida
How do I sort the second layer of a 3D matrix based on the first layer?
I'm fairly sure there's always a better way of doing things than what I do, but here is what I came up with quickly. A = da...

casi 8 años hace | 0

| aceptada

Respondida
Read out a textfile -> search for special characters and save the value after it -> and save them to the corresponding rows.
Generally I use fgetl() to extract data from a mixed string and number line. It's not the most efficient I'm sure, but it has be...

casi 8 años hace | 0

Pregunta


While loop ends unexpectedly
I have an executable file which creates an ascii file containing numbers and characters mixed. I have written a while and if loo...

casi 8 años hace | 1 respuesta | 0

1

respuesta

Pregunta


Extract structure array elements into seperate matrix
I have a structure array with two fields that has multiple sets of information: data(1).setnum = 1; % Contains integers to ...

casi 8 años hace | 1 respuesta | 0

1

respuesta

Respondida
How to extract specific data from data files
I'm fairly certain there is a better way of doing this, but I personally would scan through each document with a for loop, and t...

casi 8 años hace | 0

| aceptada

Respondida
How to turn values in one matrix corresponding to a specific element in another into NaN
nanarray = isnan(A); B(nanarray==1) = NaN; Did you mean to have the B(3,2)=NaN instead of B(3,1)?

casi 8 años hace | 0

Respondida
Logical indexing a 2D array into a 2D array
So, to clarify, you want to have your columns turned into rows? Because you are looking to roughly keep the row and column lo...

casi 8 años hace | 0

Respondida
How to save multiple outputs of a function with changing inputs
You want to store the data somewhere else inside your for loop. for N1 = [6,3] ... dataout(1) = P6; % Store P6 into...

casi 8 años hace | 0

| aceptada

Respondida
Use loops to produce the beautyofmath shown.The script should iterate from 1 to 11 to produces expression on the left, and perform specified operation to get the results shown on the right.
You need to add the previous 'value' to the sum of your powers of 10 for each step in p. I would suggest doing this by turning p...

casi 8 años hace | 1

Respondida
What does this mean exactly
D(1) does not change because you have k = 2:m, so the lowest value i can ever be is k=2. Are you sure that x0(i-(k-1)) is cor...

casi 8 años hace | 0

Respondida
Sorting file from CSV
Ok, so you're trying to collect a set of file names? I would suggest organizing using indexing then. A = % Data block he...

casi 8 años hace | 0

Respondida
How can I change the entries in one column of a cell array based on the previous columns?
To accomplish this I would suggest using a for loop to go through each row, and then an if statement inside the loop to determin...

casi 8 años hace | 0

| aceptada

Respondida
How to divide this data ?
The sorting is relatively easy with indexing. rank = [18 9 15 17 2 10 13 14 20 5 11 7 8 6 4 19 3 16 1 12 21] ranka = ran...

casi 8 años hace | 0

| aceptada

Respondida
maximum value in each column
There is a function for finding maximums, max(), which finds the maximum value of a specified region. All you need to do is inde...

casi 8 años hace | 0

Respondida
Generate combinations of Cells that contain text
If somebody knows a way to conduct this without loops feel free to mention it, but I do know that you can record all possible co...

casi 8 años hace | 0

Respondida
Number in a cell to a row number in loop.
If you're just looking to use those values as row selection you can enter them as the index of your value: for k = 1:length...

casi 8 años hace | 0

| aceptada

Respondida
what is the function of the while loop in this code
1) I'm pretty sure that MATLAB logic doesn't work for that while condition. It should be: while -0.00001>c || c<0.000001; ...

casi 8 años hace | 0

Respondida
cell contents assignment to a non-cell array object
C = zeros(1:10); This defines C as a double class array with 10 dimensions. C{x} = ... This attempts to populate a ...

casi 8 años hace | 0

| aceptada

Respondida
Design choice for iterating over a cell array
I can't really speak to why the language was _designed_ in that manner, but I can say that there are times where you want to con...

casi 8 años hace | 1

Respondida
Find value from column / row number
If all you want to know is the value of a certain part of the matrix just call the index. A(3) A(3) = 8 You can cal...

casi 8 años hace | 0

Respondida
How can I cross reference the data in two excel tables?
Ok, since you're a new Matlab user I'm going to give you a basic method for accomplishing what you're looking to do. This is not...

casi 8 años hace | 1

| aceptada

Respondida
Removal of values from cell arrays
Is it possible for you to rearrange X to be 3x1 array of matrices like before and after? If so then you can use the following: ...

casi 8 años hace | 0

| aceptada

Respondida
remove rows from a cell array until condition doesn't met
If you're trying to just get rid of all U rows then you will want to use something more like this: U=find(AGe<CONS_T3); ...

casi 8 años hace | 0

Respondida
Multiplication of each column with each other with a condition
You could accomplish this fairly easily using one or two for loops, depending on your style. The only loop you really require i...

casi 8 años hace | 0

Cargar más