Risolto


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 ...

oltre 14 anni fa

Risolto


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...

oltre 14 anni fa

Risolto


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

oltre 14 anni fa

Risolto


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...

oltre 14 anni fa

Risolto


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 ...

oltre 14 anni fa

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

oltre 14 anni fa | 0

Risposto
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...

oltre 14 anni fa | 0

| accettato

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

oltre 14 anni fa | 0

| accettato

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

oltre 14 anni fa | 0

Risposto
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];

oltre 14 anni fa | 0

Risposto
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...

oltre 14 anni fa | 0

Risposto
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...

oltre 14 anni fa | 0

Risposto
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...

oltre 14 anni fa | 1

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

oltre 14 anni fa | 0

Risposto
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...

oltre 14 anni fa | 0

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

oltre 14 anni fa | 0

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

oltre 14 anni fa | 0

| accettato

Risposto
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...

oltre 14 anni fa | 1

Risposto
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...

oltre 14 anni fa | 1

Risposto
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 ...

oltre 14 anni fa | 1

| accettato

Risposto
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 ...

oltre 14 anni fa | 0

Risposto
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...

oltre 14 anni fa | 0

| accettato

Risposto
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 ...

oltre 14 anni fa | 1

| accettato

Risposto
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? ...

oltre 14 anni fa | 1

Risposto
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...

oltre 14 anni fa | 0

Risposto
save to excel file
You are telling it to start in the same cell every time through the loop.

oltre 14 anni fa | 0

Risposto
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:...

oltre 14 anni fa | 0

Risposto
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, ...

oltre 14 anni fa | 0

Risposto
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...

oltre 14 anni fa | 0

Risposto
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...

oltre 14 anni fa | 0

| accettato

Carica altro