Beantwortet
convert a html table to csv format
As Matt mentions, Python + package would be perfect for this part. Here is one way to do it using REGEXP in MATLAB.. not the ful...

mehr als 13 Jahre vor | 0

Beantwortet
Edit line in text document
If you want to change part of a line based on a match (checkstr), a good way to achieve this is to use regular expressions, e.g....

mehr als 13 Jahre vor | 2

| akzeptiert

Beantwortet
Index exceeds matrix dimensions.
length(data8(:,1)) is evaluated only once at the beginning of the FOR loop. It is e.g. 10. Then you remove rows from |data8|...

mehr als 13 Jahre vor | 0

| akzeptiert

Beantwortet
Plz explain the operation
CELLFUN is called with two arguments: an anonymous function, and a cell array. It applies the anonymous function to each element...

mehr als 13 Jahre vor | 0

| akzeptiert

Beantwortet
need help splitting a long series of data with date headers
This question is more tricky than it really appears. The reason is that you can have months, days, and hours I guess, on one or ...

mehr als 13 Jahre vor | 0

Beantwortet
How to increment string
fname = sprintf('filename(%d).jpg', m) ; saveas(C, fname) ;

mehr als 13 Jahre vor | 0

| akzeptiert

Beantwortet
plotting a single vector out of a multidimensional array?
You have two singleton dimensions when you index |Xhat(1,3,:)|. Look at the following: >> A = rand(2,3,4) ; >> v = A(1,2...

mehr als 13 Jahre vor | 4

| akzeptiert

Beantwortet
[Effective Coding] for loop
You could go for a variation of the following (EDITED): >> TIT2(1) + sum(diff(TIT2) == 1) ans = 3 PS: I assumed ...

mehr als 13 Jahre vor | 0

Beantwortet
Are you using "Accept an answer to a question (7 days after the question was asked)"?
Thank you all for your input (including Wendy who posted <http://www.mathworks.com/matlabcentral/answers/42263-when-to-accept-an...

mehr als 13 Jahre vor | 3

Beantwortet
splitting a array at defined interval
Alternatively: loc = find(c >= 10) ; vind = c(loc) ; c(loc) = [] ; out = mat2cell(c, 1, vind) ;

mehr als 13 Jahre vor | 1

| akzeptiert

Beantwortet
two matrix in one, condition...matlab
>> [C,ia,ib] = intersect(A(:,1:2),B(:,1:2),'rows') ; >> result = [C, A(ia,3), B(ib,3)] result = 1 10 3 16 ...

mehr als 13 Jahre vor | 0

| akzeptiert

Frage


Are you using "Accept an answer to a question (7 days after the question was asked)"?
Dear all (who have a 500+ rep), &nbsp;&nbsp;&nbsp;&nbsp;I was wondering about your take on this mechanism (possibility to acc...

mehr als 13 Jahre vor | 4 Antworten | 3

4

Antworten

Beantwortet
How to reorder cell array columns based on the order of a vector matrix, while keeping rows intact in Matlab?
Would this work? >> buffer = arrayfun(@(rId) data(rId,order(rId,:)).', 1:size(order,1), ... 'UniformO...

mehr als 13 Jahre vor | 0

| akzeptiert

Beantwortet
remove negative cells in a matrix by averaging
See my comment below your question and note that none of the solutions below solves the problem of managing cases where the aver...

mehr als 13 Jahre vor | 0

Beantwortet
how to give color to an output text
Use a combination of FPRINTF and CPRINTF, without outputting CR/LF before the "final" end of line. >> fprintf('This is a ') ...

mehr als 13 Jahre vor | 2

| akzeptiert

Beantwortet
how can i eliminate NaN and Inf from a matrix please help me thanks a lot
Technically: >> lamda(isnan(lamda)) = 234 lamda = 234 0 0 0 0 0 0 0 0 0 234 ...

mehr als 13 Jahre vor | 2

Beantwortet
Unique Function based on 2 columns [Instead of rows]
*NEW ANSWER AFTER 2ND EDIT* You could do it as follows (you might want to fine tune it): diff(find([true; any(diff(a{1}(:...

mehr als 13 Jahre vor | 1

| akzeptiert

Beantwortet
How to find biggest element of the array?
MAX works along a specific dimension (that you can specify using an extra arg). One way to find the overall max is to index |A| ...

mehr als 13 Jahre vor | 0

Beantwortet
Storing Multiple Matrices from a For Loop
You can use a cell array, e.g n = 10 ; M = cell(n, 1) ; for k = 1 : n M{k} = 20*k + rand(10) ; end you can see...

mehr als 13 Jahre vor | 46

| akzeptiert

Beantwortet
joining two arrays to make a longer one
If all vectors are column vectors, do the following: data = [] ; for f = 1 : nFiles % Load file f: % ... whate...

mehr als 13 Jahre vor | 1

Beantwortet
Reading multiple text file and saving in corresponding excel format after removing headers.
If you want to keep obs var1 var2 var3 var4 var5... as a header (one row of columns header), you can perform the fol...

mehr als 13 Jahre vor | 0

| akzeptiert

Beantwortet
Function Variable to update workspace variable
You can use both EVALIN and ASSIGNIN, but I would not recommend this; why not simply using an output argument? E.g. eeg = ....

mehr als 13 Jahre vor | 0

Beantwortet
select certain rows of a matrix dased on which data their elements are from
You almost did it; the expression data(:,6)>=StartDate & data(:,6)=<EndDate should be ( |=<| is not a relational operator...

mehr als 13 Jahre vor | 1

| akzeptiert

Beantwortet
How to count unique value in array?
You could build something around the following example: >> b = a([diff(a)~=0, false]) b = 2 1 3 2 1 ...

mehr als 13 Jahre vor | 1

Beantwortet
Vector Function to calculate grades
Assuming that my comment above is valid and that the full matrix of point is |P|, you can get the sum of points per student as f...

mehr als 13 Jahre vor | 0

| akzeptiert

Gelöst


Generate a NaN...on purpose
The goal is to create a function that will return a single "NaN" without using the nan function. I am interested to see how many...

mehr als 13 Jahre vor

Beantwortet
Extracting number from output file
>> buffer = fileread('data.txt') ; >> loc = strfind(buffer, 'SCF Done: E(RB3LYP)') ; >> value = sscanf(buffer(loc+22:end), ...

mehr als 13 Jahre vor | 0

Beantwortet
Read matrix from a txt file after a specific expression
You should use TEXTREAD with the |'heaerlines'| parameter set to the number of lines (e.g. 3) that characterizes your header. ...

mehr als 13 Jahre vor | 0

| akzeptiert

Beantwortet
How to write cell array into a csv file
To write the data in C to a CSV file. Use “writetable” in combination with the “cell2table” function. % Convert cell to a tabl...

mehr als 13 Jahre vor | 28

| akzeptiert

Beantwortet
3D array - Assignment has more non-singleton rhs dimensions than non-singleton subscripts
Look at the size of |cellDist|, it is probably not a&nbsp;&nbsp; |cellNum x cellNum| &nbsp;&nbsp;array.

mehr als 13 Jahre vor | 0

Mehr laden