Answered
how to import data
Doc says: Import Numeric Data from a Text File You can import any ASCII data file with numeric fields easily ...

14 years ago | 0

Answered
finding the top ten values of arrary
Try this: %% M = magic(4); N = 10; %% [ b, ix ] = sort( M(:), 'descend' ); %% [ rr, cc ] = ...

14 years ago | 1

| accepted

Answered
how to count the match
I guess that if you are not more specific you'll get an answer like this :) number_of_matches = 0; ... if ...

14 years ago | 0

Answered
how read this txtfile?
This is a start. Add a loop and fgetl. %% str = '1|Toy Story (1995)|01-Jan-1995||http://us.imdb.com/M/title-exact?Toy%2...

14 years ago | 0

| accepted

Answered
How to pull files from mutiple folders
See the FEX contributions: * <http://www.mathworks.se/matlabcentral/fileexchange/32226-recursive-directory-listing-enhanced-r...

14 years ago | 0

Answered
Textscan skipping character 'd'
Try: DepVar = textscan( fileName, 'Br%u%[THAMS]%d%c%*s' ); . *--- Response to comment ---* I cannot reproduce th...

14 years ago | 0

Answered
Loading ASCII tables into MATLAB as strings to be processed
I assume that your data is in a text file. This code will read the file fid = fopen( 'cssm.txt' ); cac = textscan(...

14 years ago | 0

| accepted

Answered
List all variables in a mfile
I think it is possible to do automatically. Idea: * set a conditional break point at the last line of every function. Hopeful...

14 years ago | 3

| accepted

Answered
Data extraction from a text file.
If all lines have the same format try data=textscan(fid,':%f'); *--- Cont. ---* This work with R2012a fid = ...

14 years ago | 0

Answered
Text output keeps repeating
When debugging did you inspect the value of output? The code you show can hardly give multiple groups of lines. The values of ro...

14 years ago | 0

Answered
how works with parallel processing?
See: <http://www.mathworks.se/products/parallel-computing/ Parallel Computing Toolbox> and return with more specific questions....

14 years ago | 1

| accepted

Answered
encryption of .mat files
Matlab documentation: New MAT-File Format Based on HDF5 In Version 7.3 (R2006b), you can save MAT-files in a format ...

14 years ago | 0

Answered
Why is the "state" important?
Start reading here: <http://blogs.mathworks.com/loren/2008/11/05/new-ways-with-random-numbers-part-i/ New Ways With Random Num...

14 years ago | 0

| accepted

Answered
how to put different colors for different bars for barh function.
Study this and note especially the length and values of neworder, neworder1 and neworder2 in your and my revised code. ...

14 years ago | 0

| accepted

Answered
Can I find out if a class is an abstract class before trying to instantiate it?
A class is abstract if any of its properties or methods is abstract. It's possible to write a function, is_abstract. Start: ...

14 years ago | 0

| accepted

Answered
Remove all fields from a struct except if
MATFILE is the closest there is to your requirement. And it is a rather new feature. I use R20012a. %% N = 8; m...

14 years ago | 2

| accepted

Answered
erasing all the rows of a cell matrix that contain a specific string variable
Your solution is based on an undocumented behavior of strcmp. strcmp according to the documentation should not take a double nor...

14 years ago | 0

| accepted

Answered
Load different files then converting them into .txt files
Make a a cell array of strings: a={'20MIN_SCHJ300639_220208.mat' '20MIN_SEMS170640_040608.mat' '20MIN_SIMG200162_060208.m...

14 years ago | 0

| accepted

Solved


Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

14 years ago

Answered
Processor usage
In discussions on performance of Matlab version of Matlab, the OS and the use of the Parallel Toolbox are all important. ...

14 years ago | 0

Answered
'For loop' for beginners
No need for a loop: positive_numbers = v(v>0); negative_numbers = v(v<0); zero_numbers = v(v==0); . S...

14 years ago | 0

| accepted

Answered
Using while loop to analyze cell array
Why a cell array of numeric data rather than a numeric array? Many questions are about removing loops. Why a while-loop? This...

14 years ago | 0

| accepted

Answered
Problems writing to text files
I have R2012a 64bit, Windows7. I tried your code with some data. The resulting file looks ok in Notepad++, but as you descri...

14 years ago | 1

Answered
how to create shortcut for "brushing/create new variable"
Did you search the FEX? You might want to try <http://www.mathworks.com/matlabcentral/fileexchange/13857-graphical-data-selectio...

14 years ago | 0

Answered
position of maximum in matrix
Help says: C = max(A,[],dim) returns the largest elements along the dimension of A specified by scalar dim. For exa...

14 years ago | 0

Solved


Multiply 2 numbers
Very easy, you just have to multiply 2 numbers but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, pro...

14 years ago

Answered
Problems with Datenum / Datestr to convert times and dates to serial time and dates
Try %% data = {'17:05:38', '06/27/12' '17:05:42', '06/27/12' }; %% out = [ datenum(data(:,1),'HH...

14 years ago | 0

Answered
how to make monthly graph from daily file data
Here is a function that returns total monthly rain. Try >> mr = MonthlyRain( RainData ); >> plot( mr(1).Rain, 'd' ); ...

14 years ago | 2

| accepted

Answered
how to make monthly graph from daily file data
Here is a function that collects total daily rain for one month at a time. Try >> [ day_number, daily_rain ] = DailyRain( R...

14 years ago | 3

Answered
how to read x file data (x=30file)
Try ix_day = 1; plot( datenum( RainData( ix_day ).Datevec ), RainData( ix_day ).Rain ) datetick title( sp...

14 years ago | 1

Load more