回答済み
How to reduce number of loops
Ok, well, you could adapt the following to your case then. I am not checking in-depth that it is working though, and there is ro...

約13年 前 | 1

| 採用済み

回答済み
Is it possible to section a very long string into a matrix?
One way would be: >> s = '56748946489148461898434919946189189454961894564349894389' ; >> num = sscanf(s, '%4f') num = ...

約13年 前 | 2

回答済み
merging two matrices (cell matrices)
The following would be one way if I interpret well your question (which is not completely clear): C = reshape([A;B], size(A,...

約13年 前 | 0

| 採用済み

回答済み
How can i connect my matlab program with matlab GUI?
I would recommend the official documentation: <http://www.mathworks.com/help/pdf_doc/allpdf.html> Under MATLAB, you can ge...

約13年 前 | 0

回答済み
Extracting data from txt file
It is a good attempt that you made here with FOPEN and FSCANF; we can discuss the format if you want, but I would recommend usin...

約13年 前 | 1

| 採用済み

回答済み
How can i sum every 12th block of data from a large data set?
You can go for a solution around: n = size(unit1, 1) ; % Should be 124390, id = zeros(n, 1) ; ...

約13年 前 | 0

| 採用済み

回答済み
Will I even use Matlab in my engineering career?
I would say that there is almost 100% chance that having learnt a language/framework for scientific computing will be useful to...

約13年 前 | 5

回答済み
How to read formated data with implied decimal point
Not to my knowledge, but even the conversion in multiple steps is interesting (and it will prop up your question as a small cha...

約13年 前 | 0

回答済み
How can I load a large csv file?
Did you try using CSVREAD and DLMREAD? The latter would allow you loading the file by block. Also, what type of data is store...

約13年 前 | 0

回答済み
Construct a large sparse matrix
Nowadays most functions are able to work on sparse matrices and output sparse matrices. If you want to be sure that it is workin...

約13年 前 | 0

| 採用済み

回答済み
in a nested for loop, if statement: how to keep doing something until a condition is met
I am not sure that I really get what you want to do, but I guess that it is something around the following (which is dangerous, ...

約13年 前 | 2

| 採用済み

回答済み
Fracture fatigue problem, summation inside loops
You are setting a condition on |dK| in your WHILE statement, but you compute |dK1| in the loop. Both should match (either use |d...

約13年 前 | 0

| 採用済み

回答済み
I am wondering how to pull up information in an excel file if the user just inputs keywords into the matlab program? so that when hey enter the key word matlab finds it in the excel file. thanks.
Accessing Excel files is rather slow; you should read the full Excel file first using XLSREAD, and then work only at MATLAB leve...

約13年 前 | 0

回答済み
How to get arg min of an N-dimensional Matrix ?
How do you define |argmin|? If it is the global min, you can get it as follows: min(M(:)) where |M| is your 3D array.

約13年 前 | 1

回答済み
printmat function for unknown number of rows
You can build your headers using SPRINTF; for example: >> M = rand(6) ; >> vheader = sprintf('ROW%d ', 1:size(M,1)) vhea...

約13年 前 | 0

| 採用済み

回答済み
To replace a character AT A PARTICULAR POSITION in a Text FIle.
*I see that you accepted 0% of the answers that were given to your 4 previous questions; please take a moment for reviewing thes...

約13年 前 | 0

| 採用済み

回答済み
Need help extracting the input from a dialog box and then fprintf it in the command window.
Almost correct; just bring the following change: fprintf( '%s = Player1\n', DialogBox{1} ) ; fprintf( '%s = Player2\n', D...

約13年 前 | 0

回答済み
Best practice for saving only one output from a vector-outputting function
Simply WantThis = myfun(x, y, ... ) if you just need/want the first output. More generally [a, b, c, d] = myfun(x, y,...

約13年 前 | 0

| 採用済み

回答済み
How to remove lines in a .txt file?
If you read the file using TEXTREAD, you don't need to have the file truncated first, because you can tell TEXTREAD to skip a gi...

約13年 前 | 7

| 採用済み

回答済み
Earth Grided Data of equivalent water height
If you have ArcGIS, you can import your dataset as an X-Y layer and save it as a point feature class using a geographical WGS198...

約13年 前 | 1

回答済み
How to create a vector with for loops and if statements
What about: v = zeros(size(t)) ; id = t >= 0 & t <= 1 ; v(id) = 1000 * t(id) ; or simpler and more efficient from the...

約13年 前 | 2

| 採用済み

回答済み
I need some help with logical operators and the find function...
You compute all elements of |V| and |H|, so they are fully defined at the moment you want to select relevant times. You can use ...

約13年 前 | 0

| 採用済み

回答済み
adding matrix to every column in other matrix
b_ext = repmat(b, 1, size(a, 2)) ; c = a + b_ext ;

約13年 前 | 0

| 採用済み

回答済み
Replace part of a column in a matrix with different values
This is a valid approach only when |LLY| is a multiple of 4. I am unsure what it is that you want to achieve, but if you want to...

約13年 前 | 0

| 採用済み

回答済み
How to structure array to serve as input parameter for function and then display in sprintf?
SPRINTF and FPRINTF are repeating |formatSpec| as many times as needed to display the content of the arguments that follow. To i...

約13年 前 | 1

| 採用済み

回答済み
Can't get function to accept array params or return arrays
You want to use an element-by-element operator for the division: m = (y1 - y2)./(x1 - x2);

約13年 前 | 1

| 採用済み

回答済み
Show column which starts with certain numbers
If your matrix is named |M|, you can do col = M(1,:) == 1 & M(2,:) == 2 ; to get a vector of logicals indicating the rele...

約13年 前 | 0

| 採用済み

回答済み
hello professionals ..i have aattached my code plz suggest me why it is not displaying value of kp2 and e
Where do you define |M| ? At this point it crashes because |M| is undefined. A few additional points: * You should not nam...

約13年 前 | 0

| 採用済み

回答済み
Randomly delete elements of a matrix
Look at the following and let me know if you have any question: M = randi(10, 4, 5) ; % Random example. [nr,nc] = si...

約13年 前 | 1

回答済み
Average Windowing of Signal - noticeable delay as time increases
It seems to me that you are not really computing an average on windows around each value, but an average by block. If this |True...

約13年 前 | 0

さらに読み込む