José-Luis
2009년부터 활동
Followers: 0 Following: 0
Professional Interests: Modeling. As in hydrology, not as in Brad Pitt.
Feeds
답변 있음
How do I save data to a TXT file?
To write a text file with columns of data that have variable names, use the “writetable” function. First, create the data to wri...
How do I save data to a TXT file?
To write a text file with columns of data that have variable names, use the “writetable” function. First, create the data to wri...
4개월 전 | 18
| 수락됨
답변 있음
How to "filter" an N-D array with matrix indexing?
data = rand(10,3,3); idx = (1:2:5)'; dims = size(data); to_add = cumprod(dims); for ii = 2:numel(dims) ...
How to "filter" an N-D array with matrix indexing?
data = rand(10,3,3); idx = (1:2:5)'; dims = size(data); to_add = cumprod(dims); for ii = 2:numel(dims) ...
대략 7년 전 | 0
답변 있음
Help with a piece of code
Generating a "binary" (logical) array: a = rand(10,1) > 0.5; Transforming the binary array into a string. _v_ is a charac...
Help with a piece of code
Generating a "binary" (logical) array: a = rand(10,1) > 0.5; Transforming the binary array into a string. _v_ is a charac...
대략 7년 전 | 0
답변 있음
poissrnd function issue: weird histogram
The loop is unnecessary: histogram(poissrnd(100,1e6,1),300) Works as expected.
poissrnd function issue: weird histogram
The loop is unnecessary: histogram(poissrnd(100,1e6,1),300) Works as expected.
대략 7년 전 | 1
답변 있음
Transforming a string of letters into number based on each value equaling a number.
str = 'bccddee'; result = sum(str - 'a' + 1)
Transforming a string of letters into number based on each value equaling a number.
str = 'bccddee'; result = sum(str - 'a' + 1)
대략 7년 전 | 2
답변 있음
Do one action to multiple arrays
The answer would be a slight adaptation of _"don't use dynamic variable names"_ with the added issue of not being able to use a ...
Do one action to multiple arrays
The answer would be a slight adaptation of _"don't use dynamic variable names"_ with the added issue of not being able to use a ...
대략 7년 전 | 1
답변 있음
How to get rid of repeating values inside an array
b = a(sum(bsxfun(@eq,a,a'))==1)
How to get rid of repeating values inside an array
b = a(sum(bsxfun(@eq,a,a'))==1)
대략 7년 전 | 1
| 수락됨
답변 있음
I'm trying to set certain rows in a 3 dimensional matrix 0
Since it is impossible setting them to empty without actually changing your array, you could use NaN instead. data(10,:,2) =...
I'm trying to set certain rows in a 3 dimensional matrix 0
Since it is impossible setting them to empty without actually changing your array, you could use NaN instead. data(10,:,2) =...
대략 7년 전 | 0
답변 있음
How can I get values for f in a matrix of dimension(100,1)?
f =@(x,y) (1-x).^2 +100*(y-x.^2).^2; dummy = linspace(-1,1,10); [xx,yy] = ndgrid(dummy,dummy); result = f(xx,yy); ...
How can I get values for f in a matrix of dimension(100,1)?
f =@(x,y) (1-x).^2 +100*(y-x.^2).^2; dummy = linspace(-1,1,10); [xx,yy] = ndgrid(dummy,dummy); result = f(xx,yy); ...
대략 7년 전 | 0
답변 있음
Finding specfic string within another string
yourStr = '\blabla\blabla\blabla\blabla\blabla\blabla\04 - Black\05 - TEST' re = '\\[0-9]{2}\s-\s[a-zA-Z]+'; result = re...
Finding specfic string within another string
yourStr = '\blabla\blabla\blabla\blabla\blabla\blabla\04 - Black\05 - TEST' re = '\\[0-9]{2}\s-\s[a-zA-Z]+'; result = re...
대략 7년 전 | 0
답변 있음
How can I plot a polar plot with varying colour
If you have R2016b or more recent: <http://se.mathworks.com/help/matlab/ref/polarscatter.html>
How can I plot a polar plot with varying colour
If you have R2016b or more recent: <http://se.mathworks.com/help/matlab/ref/polarscatter.html>
7년 초과 전 | 1
답변 있음
How to run scripts (not functions) with predefined user inputs?
<https://se.mathworks.com/help/matlab/ref/input.html>
How to run scripts (not functions) with predefined user inputs?
<https://se.mathworks.com/help/matlab/ref/input.html>
7년 초과 전 | 1
답변 있음
Derivative in function handle
If you're gonna do this numerically, you need to specify an interval in which to evaluate. Note that diff doesn't really give th...
Derivative in function handle
If you're gonna do this numerically, you need to specify an interval in which to evaluate. Note that diff doesn't really give th...
7년 초과 전 | 1
답변 있음
How to create a random gamma distributed vector with a mean of 0.1 and entries between 0 and 1?
The <https://se.mathworks.com/help/stats/gamrnd.html gamma distribution> takes two parameters: the shape and the scale. The mean...
How to create a random gamma distributed vector with a mean of 0.1 and entries between 0 and 1?
The <https://se.mathworks.com/help/stats/gamrnd.html gamma distribution> takes two parameters: the shape and the scale. The mean...
7년 초과 전 | 1
| 수락됨
답변 있음
If I am given coordinates of three points, how can I plot an arc using those 3 points in matlab?
<https://se.mathworks.com/matlabcentral/fileexchange/57668-fit-circle-through-3-points>
If I am given coordinates of three points, how can I plot an arc using those 3 points in matlab?
<https://se.mathworks.com/matlabcentral/fileexchange/57668-fit-circle-through-3-points>
7년 초과 전 | 0
답변 있음
Function not supported for code generation
You can't. It's up to the Mathworks to decide which functions to include. You could always ask them nicely. I don't kno...
Function not supported for code generation
You can't. It's up to the Mathworks to decide which functions to include. You could always ask them nicely. I don't kno...
7년 초과 전 | 0
답변 있음
how to not exceed limits of the matrix column
your_array = rand(10,16) %looping through all columns for ii=your_array %ii now contains all values in column end
how to not exceed limits of the matrix column
your_array = rand(10,16) %looping through all columns for ii=your_array %ii now contains all values in column end
7년 초과 전 | 0
| 수락됨
답변 있음
how to density plot of a scatter plot?
<https://se.mathworks.com/help/matlab/ref/histogram2.html |histogram2()|>
how to density plot of a scatter plot?
<https://se.mathworks.com/help/matlab/ref/histogram2.html |histogram2()|>
7년 초과 전 | 0
답변 있음
Various inputs and outputs in functions
You could pass a structure to your function. The structure could contain whatever flags and arguments you need. Same goes for th...
Various inputs and outputs in functions
You could pass a structure to your function. The structure could contain whatever flags and arguments you need. Same goes for th...
7년 초과 전 | 0
답변 있음
How can I get a vector out of a matrix?
Sounds like a job for <https://se.mathworks.com/help/matlab/ref/sub2ind.html |sub2ind()|>
How can I get a vector out of a matrix?
Sounds like a job for <https://se.mathworks.com/help/matlab/ref/sub2ind.html |sub2ind()|>
7년 초과 전 | 0
답변 있음
How do I exclude NaN values when calculating mean of each row in a matrix?
y = nanmean(a,2)
How do I exclude NaN values when calculating mean of each row in a matrix?
y = nanmean(a,2)
7년 초과 전 | 1
답변 있음
I want to obtain number of cases(matrix's length) . By applying same sum in any matrix. (on constraints)
If what you mean is that you want the sum of a random array of four elements to be thirty with some condition placed on the last...
I want to obtain number of cases(matrix's length) . By applying same sum in any matrix. (on constraints)
If what you mean is that you want the sum of a random array of four elements to be thirty with some condition placed on the last...
7년 초과 전 | 0
답변 있음
What is the use of state in randseed() function?
Random numbers in Matlab are not random. They are pseudo-random: they are based on deterministic algorithms. You can consider...
What is the use of state in randseed() function?
Random numbers in Matlab are not random. They are pseudo-random: they are based on deterministic algorithms. You can consider...
7년 초과 전 | 0
답변 있음
I unable to run my program.Please help me...
custlogpdf =@(x,d,r) log(factorial(r+x-1)/(factorial(x)*factorial(r-1))+ log(s1));
I unable to run my program.Please help me...
custlogpdf =@(x,d,r) log(factorial(r+x-1)/(factorial(x)*factorial(r-1))+ log(s1));
7년 초과 전 | 0
답변 있음
Why does == not work with decimal indexed for loop?
From the documentation: _"x = j:i:k creates a regularly-spaced vector x using i as the increment between elements. The vector...
Why does == not work with decimal indexed for loop?
From the documentation: _"x = j:i:k creates a regularly-spaced vector x using i as the increment between elements. The vector...
7년 초과 전 | 1
| 수락됨
답변 있음
Check for identical maximum values in an array
Number of maximum values: numMax=sum(A(:) == max(A(:))); if numMax > 1 %Do your thing end
Check for identical maximum values in an array
Number of maximum values: numMax=sum(A(:) == max(A(:))); if numMax > 1 %Do your thing end
7년 초과 전 | 1
답변 있음
Replot a matlab.graphics.chart
Not sure this is what you mean: numPlots = 10; lH = cell(1,numPlots); for ii = 1:numPlots hold on; ...
Replot a matlab.graphics.chart
Not sure this is what you mean: numPlots = 10; lH = cell(1,numPlots); for ii = 1:numPlots hold on; ...
7년 초과 전 | 0
답변 있음
what can be maximum number number of alphabet in name of model ?
From the documentation: _"Model Names:_ _Model file names must start with a letter and can contain letters, numbers, and u...
what can be maximum number number of alphabet in name of model ?
From the documentation: _"Model Names:_ _Model file names must start with a letter and can contain letters, numbers, and u...
7년 초과 전 | 0
| 수락됨
답변 있음
How to change the output file name with the same input file name but with a different extension ?
old = 'BOB_LEHAR_CS_2013112718_TRMM.nc'; new = regexprep(old, '\.[^.]+$', '.grd')
How to change the output file name with the same input file name but with a different extension ?
old = 'BOB_LEHAR_CS_2013112718_TRMM.nc'; new = regexprep(old, '\.[^.]+$', '.grd')
7년 초과 전 | 0
답변 있음
Turning x amount of data points in to 100 to get a percentage
If you have the signal processing toolbox: <https://se.mathworks.com/help/signal/ref/resample.html>
Turning x amount of data points in to 100 to get a percentage
If you have the signal processing toolbox: <https://se.mathworks.com/help/signal/ref/resample.html>
7년 초과 전 | 0
| 수락됨