Beantwortet
dir-command: import only files that have datenum between two dates
I don't know that cellfun is going to work on the dir results because they are an array of structures. You should be able to sol...

mehr als 7 Jahre vor | 0

Beantwortet
Storing multiple different values from an equation in a for loop
Because you are running multiple two for loops, you likely need to have two dimensional indexing. V(k,m) = ... This should giv...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How can fix index exceeds matrix error
Your first error occurs with teta{i} = acosd(br/r2{i}); because r2 has one less element than the max values of i. I would sugges...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
For loop inside structure
fields = fieldnames(level3); for k=1:10 x = [x0. * vx]; end If I understand this correctly you're trying to capture the ...

mehr als 7 Jahre vor | 1

Beantwortet
1X1500 cell array to matrix
You can try using cell2mat(), but I'm not intimately familiar with it enough to know if it will work with arrays inside each cel...

mehr als 7 Jahre vor | 0

Frage


How to output function results over split columns
I have a loop which contains a function that produces results to a different sheet of a matrix. I would like to insert an additi...

mehr als 7 Jahre vor | 1 Antwort | 0

1

Antwort

Beantwortet
dividing data into sub-data
A = [-1 1 1 1; -1 -1 -1 1; -1 1 -1 -1; -1 1 1 -1; -1 1 1 -1]; B = A(:,1:2); C = A(:,3:4);

mehr als 7 Jahre vor | 0

Beantwortet
how to enter struct into new struct ?
I'm going to assume that data(i) = data1 does not work, because you're trying to put an entire array into a single element of a ...

mehr als 7 Jahre vor | 0

Beantwortet
I am currently writing a code to plot the coordinates of a five digit airfoil, but I keep getting the error : "index exceeds matrix dimensions". What do I do ?
The issue is that yt only contains one value. I suspect you may have forgotten an index on the following line: yt=5*T*(t0+t1+t2...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How do I import different *.txt file into matlab?
To the best of my knowledge the 'import' commands are just not intended to handle more than one file at a time, so your best bet...

mehr als 7 Jahre vor | 0

| akzeptiert

Frage


Concatenating data from structure array for plotting
I have a structure array with several levels of depth that I am trying to extract a specific set of data from in order to plot i...

mehr als 7 Jahre vor | 2 Antworten | 0

2

Antworten

Beantwortet
Reading Columns with dlmread
I advise reading the entire file with csvread(), and then extracting the column from the data within matlab. It is generally ver...

mehr als 7 Jahre vor | 0

Beantwortet
Retrieve data from several structures and folders
If I'm understanding this correctly, you're looking to dynamically change the variable you're using each time you go through the...

mehr als 7 Jahre vor | 0

Beantwortet
Find slope across columns of cell
How are you organizing the data into ordered pairs? I'm assuming that by 'numerical data' you mean you have cells that contain i...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
adding an additional variable to a bracket
I'm a little confused at what the problem is exactly. Would you be willing to explain a little bit more about what exactly you h...

mehr als 7 Jahre vor | 2

| akzeptiert

Beantwortet
problem in matrix dimension
I think that your issue is with K*Y. As best I can tell, K is 3x3, while Y is 2x2, so it is not possible to do matrix multiplica...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Problem with my code- trying to iterate through a matrix
Why are you setting both x0 and y0 equal to the ordered pair of your 'origin'? [x0]=rand_values(index,:); [y0]=rand_va...

mehr als 7 Jahre vor | 0

Beantwortet
Create a zero matrix and update cells based on other column values
I'm going to take a stab at what you're looking for here, let me know if I need to adjust something. I'm going to begin with th...

mehr als 7 Jahre vor | 0

Beantwortet
how do I clear excel content of an old file before saving the news results to it?
One option for doing this is to specify your maximum range all the time, rather than adjusting to a specific range. Anything bey...

mehr als 7 Jahre vor | 2

Beantwortet
How to create a distance matrix in matlab
What do you mean by 'picking order'? I have no experience actually doing this, but my first thought would be to create a matrix...

mehr als 7 Jahre vor | 1

Beantwortet
Sortrows alternative / matrix sorting
I know it may not be the fastest method, but what about using a loop to sort each element. Because you have 'time' and a piece o...

mehr als 7 Jahre vor | 0

Beantwortet
Need help reading from arrays and finding corresponding value
When combining multiple if conditions you want to use & (and) and | (or). For your purpose though you can just find the minimum...

mehr als 7 Jahre vor | 0

Beantwortet
How to loop inputs into a structure
First guess at your problem is that the initial for loop where you define all of the inputs doesn't save the results in an index...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How to import multiple data from .csv and analyse them?
files = dir('Your file directory'); % I suggest adding a *.csv to this to only get the .csv files. for i = 1:length(files) ...

mehr als 7 Jahre vor | 2

| akzeptiert

Beantwortet
Extract and average from matrix
The lowest difficulty way of doing this, that I can think of, is to use a for loop. for i = 1:length(data)/7; ave(i) = mea...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How to select rows with a particular value form one text file and write desired rows in new file?
I'm assuming the file only has numeric data. data = dlmread('yourfilename.txt'); datan = data(data(:,3)<0.4,:); dlmwrite('you...

mehr als 7 Jahre vor | 1

Beantwortet
How to create a for loop to calc average of datas in a STRUCTURE?
I apologize, I don't quite understand what you're looking for as a final product. Would you mind restating it, and maybe having ...

mehr als 7 Jahre vor | 0

Beantwortet
How to stop loop from giving my matrix a certain value?
I suspect the issue is that you are not indexing Matrix during your elseif condition. If you want to run the loop you should set...

mehr als 7 Jahre vor | 0

Beantwortet
Help with looping through columns from .csv-file and writing data to .xlsx-file
It is the presence of the internal letter loop that is causing your problem. You are writing all five cells for each time you ru...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
How to plug in values from for loop to a single formula?
I'm assuming you want the result for each set of inputs. Personally, I think the easiest way to do this is by putting the equati...

mehr als 7 Jahre vor | 0

| akzeptiert

Mehr laden