回答済み
removing rows containing certain values
Seth, You can create logical indexes with conditional statements, and use the *&* for "and" as well as *|* for "or" to combin...

約8年 前 | 2

回答済み
writing each line of a text file in a cell array
Hi Shima, From context clues, I'm guessing "myfile.txt" is a space-delimited table of data. Your approach is useful if you do...

約8年 前 | 2

| 採用済み

回答済み
How can I add XML attributes and corresponding values in line to RootNode
Hi Mateusz, You can add attributes directly to element nodes as well. I am providing code to create the < Attribute/ > node w...

約8年 前 | 3

| 採用済み

回答済み
how can I plot single x-value of type string against multiple y-values of type double?
You could visualize the data in many ways. Here's a simple way scatter the data and label each series. % using random data ...

約8年 前 | 1

| 採用済み

回答済み
if else, for loop, working with character variables
Two questions: 1. Is z.new initialized before you start assigning values to it? 2. Did you try curly braces? if z.LOA...

約8年 前 | 0

| 採用済み

回答済み
Import Excel data into Matrix, then search Matrix for specified text?
Samuel, You should probably take some time to read up on <http://www.mathworks.com/help/matlab/getting-started-with-matlab.ht...

約8年 前 | 1

回答済み
how can I sort an array of elements corresponding to another array of elements in decreasing order?
Try this out: % sort A in descending order (decreasing A values) % and keep the sort index in "sortIdx" [A,sortI...

約8年 前 | 11

回答済み
How to select the row of an element in a vector and put it in the same row for a different matrix?
Here's an example of creating an index and using it appropriately: A = [1;2;3]; B = NaN(3,5); % find where A is e...

約8年 前 | 0

| 採用済み

回答済み
is it possible to modify sudoku.m so that it counts how many times has called itself?
John, I'm not going to download the book or the sudoku.m file. Instead, here's an example called john_sudoku() with a recursi...

約8年 前 | 1

| 採用済み

回答済み
I need help importing this complicated data set into MATLAB.
Drew, I made a text file called DrewL.txt which literally has the faux-data you posted in your question. I am using the forma...

約8年 前 | 0

回答済み
Limits in hours in date vectors (datevec function)
This appears to be a bug in datestr() which *you can report to Mathworks support.* In Matlab 2015a, datestr line 166 has an i...

約8年 前 | 1

| 採用済み

回答済み
How do I create a matrix with the diagonals set to 10 and non-diagonals a random integer (0 to 2) where each row sums to 10 (without including diagonal)?
Here's a solution where you can change the values of matrix size, diagonal value, and non diagonal sum. Values between 0 and 2 a...

約8年 前 | 1

| 採用済み

回答済み
Set environment path using IP for directory
I believe this post discusses the format you're looking for. http://superuser.com/questions/267844/full-uri-to-a-file-on-anot...

約8年 前 | 0

回答済み
Generate all possible combinations of a few numbers when the internal order doesn’t matter and the length varies?
You're asking for the power set of your data. Careful not to use large arrays since the calculation will get out of hand rather ...

約8年 前 | 0

| 採用済み

回答済み
How can a plot from an "if" inside of a while loop?
Pre-allocate a large array to load values into during the loop. At the end of the loop, you can plot them all at once. I added t...

約8年 前 | 1

| 採用済み

回答済み
How can I combine multiple excel files in a single new excel file?
Is D a local disk or a remote network disk? This will go much faster if you save the files locally before trying to read them al...

約8年 前 | 5

| 採用済み

回答済み
Vectorization question (trying to avoid for loops)
I deleted the clear lines and switched the ( *t_max+1*) tendency to simply be *t_max*. I added *t_max* and *I* values up top so ...

約8年 前 | 1

| 採用済み

回答済み
convert cell array of different data type char and number to matrix
You have several options. 1) If every cell in your cell array contains a scalar double value, cell2mat() will work properly. ...

約8年 前 | 0

回答済み
How can I extract a certain 'cluster' of elements according to a particular condition on the elements?
Assuming you only want to find submatrices along the diagonal of C, the following code extracts all square submatrices (>rho) in...

約8年 前 | 1

回答済み
how to read .DOT file in matlab??
deep, Matlab doesn't have any built in functions to read and render .DOT images. You could do this outside of Matlab using to...

約8年 前 | 1

回答済み
How to evaluate a cell of function handles?
Max, If your function handles can accept an array of x values and return an array of results, then your current implementatio...

約8年 前 | 3

| 採用済み

回答済み
automating script using uiload
jakob, You can get the variables loaded in your workspace with the who command. Try out this example: m2 = magic(2); ...

約8年 前 | 0

| 採用済み

回答済み
How to code for generating a crossword out of some given random letters?
The code from the top 5 submissions is available by clicking the *Title* links here: http://www.mathworks.com/matlabcentral/c...

約8年 前 | 0

| 採用済み

回答済み
Plotting 3 matrix vs range curves
I don't know what the values of pcu or w are, but here's a simplification that works fine. t = 1e-9:1e-9:1000e-9; Rf = (...

8年以上 前 | 0

回答済み
writing data to excel files
When writing to a row, specify your data as a row vector. When writing to a column, specify your data as a column vector. In ...

8年以上 前 | 0

| 採用済み

回答済み
Read data from .dat file
You've given textscan directions to read 5 columns where the first two are %u (integers) and the next three are %f64 (doubles). ...

8年以上 前 | 1

| 採用済み

回答済み
Plot title sprintf format pi
x is a double-precision floating point number. It will be displayed as a decimal by default. You can control how the double is r...

8年以上 前 | 1

| 採用済み

回答済み
Creating Matrix using two vectors and scalar
jack, Please read the <http://www.mathworks.com/help/matlab/ref/repmat.html repmat() documentation> to understand its interfa...

8年以上 前 | 1

回答済み
Combine datasets of unequal lengths by matching dates
niki, You can do all of this quite easily if you first put your data into <http://www.mathworks.com/help/matlab/tables.html t...

8年以上 前 | 3

| 採用済み

回答済み
isequal functions is not working, what am I doing wrong?
In your Command Window, type this: format long A_T A_1 You'll see elements of A_T and A_1 are essentially the same...

8年以上 前 | 0

| 採用済み

さらに読み込む