已回答
How to write this for loop into while loop?
Something like this might do it k = 1; while k <= 9 x = k^2 k = k+3; end

11 years 前 | 0

| 已接受

已回答
Find multiple true in same row
Hint: >> A=[1 0 0; 1 0 1] A = 1 0 0 1 0 1 >> B = A==1 B = 1 0 ...

11 years 前 | 0

| 已接受

已回答
if statements, setting large numbers
The matlabish way: >> test = @(a,b) ( a>5 & b<5 ); >> test( [1;6],[6;1] ) ans = 0 1 >> test(6,6)...

11 years 前 | 0

已回答
how to use datestr?
With R2013a this is the way >> vec = datevec( now ) vec = 1.0e+03 * 2.0150 0.0050 0.0230 0.0070 ...

11 years 前 | 1

| 已接受

已回答
Use of Persistent Variables in Class Methods Producing Incorrect Result.
I reproduced the behavior with R2013a and it's not what I would have expected. However, whether it's _"incorrect results"_ depen...

11 years 前 | 1

已回答
How to use memoization in MatLab?
See <http://blogs.mathworks.com/loren/?p=19?s_tid=srchtitle Use nested functions to memoize costly functions>, search <http://ww...

11 years 前 | 1

已回答
How to use memmapfile for a very large structured binary file
This gave me a chance to try a complicated format. Result: filespec = 'usgsdems.dat'; % A sample file I found in the Map ...

11 years 前 | 2

| 已接受

已回答
divide a large text file into two text files
Alternatives * The free (as in beer) program <http://www.gdgsoft.com/gsplit/index.aspx GSplit> splits the file. I was able t...

11 years 前 | 1

| 已接受

已回答
how to convert a column of cells into string?
NaN is double >> class( nan ) ans = double replace Nan by *|''|* (empty string) >> alldata = {'abc', nan, '...

11 years 前 | 1

| 已接受

已回答
how i can take part of email address
... and with *|regexp|* >> regexp( 'baashe@hotmail.com', '(?<=@).+$', 'match' ) ans = 'hotmail.com'

11 years 前 | 1

| 已接受

已回答
Read one column of unknown length from CSV file
I failed. Since *|csvread|* is based on *|textscan|*, I propose you use *|textscan|*. It's at least better documented - IMO. ...

11 years 前 | 1

| 已接受

已回答
Comparing vectors and determining unique values?
Try this script %% cac = { [1 0 3 4] [0 2 3 0] [0 2 0 4] [0 2 3 4] }; % ixa = ( 1 : numel(cac) ); % lin...

11 years 前 | 0

提问


NetCDF or HDF5 or XYZ to provide time series data at the fingertips of the user
. *Question:* Have I done my homework well enough to choose HDF5 and stop thinking about alternatives? *One more question:...

11 years 前 | 3 个回答 | 2

3

个回答

提问


Does the TODO/FIXME Report work with m-files in a package?
*This issue is resolved in R2013b* --------------------------------- Is the TODO/FIXME Report supposed to work without lim...

11 years 前 | 1 个回答 | 0

1

个回答

提问


Fastest way to search for a short vector in a huge array?
*Background* I have a 16GB text file, which is some kind of dump of a datacube. Each "observation" represents a measured valu...

11 years 前 | 0 个回答 | 0

0

个回答

已回答
how to find the largest power of 2 that a number is divisible?
Hint: >> factor(12) ans = 2 2 3

11 years 前 | 0

| 已接受

已回答
Question about the '@' symbol.
See <http://se.mathworks.com/help/matlab/matlab_prog/anonymous-functions.html Anonymous Functions>

11 years 前 | 2

已回答
Reading some part of a file
Replace formatspec = '%8c %6c %6c %d %64c %10c %d %d %s %s %s'; by formatspec = '%*8c %*6c %*6c %*d %*64c %*10...

11 years 前 | 0

| 已接受

已回答
How to identify a string and copy the value from the text file
This script str = fileread( 'cssm.txt' ); cac = regexp( str, '(?<=LMD\[q=1,d=2\][ ]+)[\d\.]++(?=[ ]+\%)', 'match','...

11 years 前 | 0

| 已接受

已回答
how to access cell array data with single for loop
C = cell( size(A)); D = cell( size(B)); for ii=1:length(A) C(ii) = A(ii); D(ii) = B(ii); end &nbsp *Add...

11 years 前 | 2

| 已接受

已回答
change the value in a matrix
Try >> B = A; >> B(abs(A)<=3) = 0 B = 0 4 0 0 5 -7 0 0 9 ...

11 years 前 | 0

| 已接受

已回答
How do I get the least used character in the text file ?
Here is a code based on *|histc|* %% ffs = 'GreatExpectations.txt'; fid = fopen( ffs ); buf = fscanf( ...

11 years 前 | 1

已回答
Read one specific file name
Replace d=dir('TRMM_*_newntcl.csv'); by d=dir('TRMM_*01_newntcl.csv');

11 years 前 | 0

已回答
textread facing unexpected characters. Gives an error.
Try >> cac = cssm cac = {6x1 cell} [6x1 double] {6x1 cell} [6x1 int32] [6x1 int32] wher...

11 years 前 | 1

| 已接受

已回答
How can I create a structure from a cell array of strings and give it the initial value of zero?
Your goal is that to create a nested structure with hundreds of fields? %% x = cellfun(@zeros, a(:,3),a(:,2),'uni',f...

11 years 前 | 0

已回答
How do I access the complex text in an xml file?
A quick and dirty variant: str = fileread( 'cssm.txt' ) cac = regexp( str, '(?<=<Nextline name=")([^"]+)" value="([^...

11 years 前 | 0

| 已接受

已回答
Storing varying sized arrays in a single matrix
That isn't possible. However, you may _"store multiple different sized arrays"_ in a cell array cac = {[0 , 1],[0 , 0.5,...

11 years 前 | 1

| 已接受

已回答
Best way to parse text file
NOAA's National Climatic Data Center (NCDC) (and others) publish important data in text files, which cannot be easily read with ...

11 years 前 | 1

| 已接受

已回答
struct problem when dealing with different field types
_"implement a cell in a struct"_ &nbsp I'm not sure I understand. Hint: >> sas = struct('vec',[1:12],'string','abcdefg...

11 years 前 | 1

| 已接受

加载更多