解決済み


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

14年弱 前

解決済み


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

14年弱 前

解決済み


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

14年弱 前

解決済み


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

14年弱 前

解決済み


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

14年弱 前

回答済み
hi
I think you mean this: x = -3:3; y = 2 * x + 3; plot(x, y);

14年弱 前 | 0

回答済み
Create test questions with multi choices
How about this: % Asks for a,b,c-style choices and returns the corresponding choice as a % number from 1 to numel(choice...

14年弱 前 | 0

| 採用済み

回答済み
How to change TolFun?
You haven't said which solver you are using. Let's assume *fzero*: opts = optimset('fzero'); opts = optimset( opts, 'To...

14年弱 前 | 0

| 採用済み

回答済み
saving vectors to an excel file
To build the filename use: ['C:\Folder\' files{k}]

14年弱 前 | 0

回答済み
How to play Maximum length sequence twice?
If you just want to repeat your signal you can append a copy like this (assuming single-row vector): x = [x x];

14年弱 前 | 0

回答済み
Recursion
Well, the thing with recursion is you take a larger problem and make it slightly smaller. So, to begin with you test whether yo...

14年弱 前 | 0

回答済み
Saving matlab code / good programming practice
You might want your function to store the run date/time when invoked, and store both itself and its output. That way, any chang...

14年弱 前 | 0

回答済み
Reading Text files and Writing to Excel sheets
You're making it pretty hard on yourself, using the file I/O functions. Try using the *textread* function to slurp everything...

14年弱 前 | 1

回答済み
XLSWRITE
If you prefer a GUI interface, do this: [filename, pathname] = uiputfile( ... {'*.xls','Excel spreadsheet (*.xls)'; '*...

14年弱 前 | 0

回答済み
basic code question
To get all but the last 3, use this: x1(1:end-3) You can work out how to get all but the first 3 =) And you already k...

14年弱 前 | 0

回答済み
How to add a favorite vector as labels for plot() function?
set(gca,'XTick',[1 2.2 3.14]);

14年弱 前 | 0

回答済み
basic code question
I assume A and B are both 100x1 row-vectors: C = [A B];

14年弱 前 | 0

| 採用済み

回答済み
Find value in second column when first column is x
The *find* function will give you the row numbers. Type: help find But if you don't care about the row indices, the pre...

14年弱 前 | 1

回答済み
How to generate pseudo random number with fix range ?
I've seen this kind of question asked before. Have a look at the solution here: <http://www.mathworks.com.au/matlabcentral/a...

14年弱 前 | 1

回答済み
Plotting large amounts of txt files then exporting results
You want to start with the *dir* command to find the contents of a directory. indir = 'mydatadir\'; % or / if you are not ...

14年弱 前 | 1

| 採用済み

回答済み
A-star obstacles
The problem is you can only compare matrices with the same dimensions, or a matrix with a scalar. You want to compare a matrix ...

14年弱 前 | 0

回答済み
2D PEAK FINDER
Howdy, if you only want to plot the peaks (with their original values) B = A; B(B <= threshold) = NaN; plot(B'); % T...

14年弱 前 | 0

| 採用済み

回答済み
append rows to same .mat file (without replacing)
From the documentation on save: '-append': Add data to an existing file. Does your file exist? if col == 1 ...

14年弱 前 | 1

| 採用済み

回答済み
A simple question about solving the polynomial
Well, there's two things here. Did you even want a polynomial in terms of x? If not, why not initially solve in terms of y? ...

14年弱 前 | 1

回答済み
Transposing matrix using reshape
Okay, got a solution. Your matrix (let's just use the example of A) can be indexed by the vector 1:6, but you need to translate...

14年弱 前 | 0

回答済み
save to excel file
You are telling it to start in the same cell every time through the loop.

14年弱 前 | 0

回答済み
second color of bar() always black?
Organise your data series into columns in a matrix and do a single bar plot. Assuming a1 and b1 are the same length, do this:...

14年弱 前 | 0

回答済み
Reading every 10th Trial Error
Your script has multiple errors, and some things that simply don't make sense. For example, why do you use _i_ to count to 10, ...

14年弱 前 | 0

回答済み
Sort
You haven't really specified if you want a sequence or just a set of numbers. Picking up on your term 'generate', perhaps you m...

14年弱 前 | 0

回答済み
How to use system to copy binary files which are not in the current directory
Have you tried just doing this from the Windows command prompt? I wasn't aware that the copy command would happily append fil...

14年弱 前 | 0

| 採用済み

さらに読み込む