Respondida
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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

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

más de 11 años hace | 1

| aceptada

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

más de 11 años hace | 1

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

más de 11 años hace | 1

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

más de 11 años hace | 2

| aceptada

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

más de 11 años hace | 1

| aceptada

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

más de 11 años hace | 1

| aceptada

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

más de 11 años hace | 1

| aceptada

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

más de 11 años hace | 1

| aceptada

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

más de 11 años hace | 0

Pregunta


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

más de 11 años hace | 3 respuestas | 2

3

respuestas

Pregunta


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

más de 11 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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

más de 11 años hace | 0 respuestas | 0

0

respuestas

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 2

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

más de 11 años hace | 0

| aceptada

Respondida
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','...

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 2

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 1

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

más de 11 años hace | 0

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

más de 11 años hace | 1

| aceptada

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

más de 11 años hace | 0

Respondida
I know this is a rookie question but its been years since I've used MatLab. I need to use p_r,p_p,p_s to calculate p_rn,p_pn,p_sn and then use those values in place of p_r,p_p,p_s in subsequent calculations and then store them all in a matrix.
_*The comment caused me to deleted my first answer.*_ *Caveat: I know next to nothing about Game Theory* *Assumption:* The...

más de 11 años hace | 0

Respondida
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="([^...

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 1

| aceptada

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

más de 11 años hace | 1

| aceptada

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

más de 11 años hace | 1

| aceptada

Cargar más