Community Profile

photo

per isakson


Last seen: Today

KTH

2,277 2010 이후 총 참여 횟수

담당자

per isakson's 배지

  • Revival Level 3
  • Ace
  • 36 Month Streak
  • Leader
  • Speed Demon
  • Promoter
  • Personal Best Downloads Level 2
  • Editor's Pick
  • First Review
  • 5-Star Galaxy Level 4
  • First Submission
  • Thankful Level 3
  • Knowledgeable Level 4
  • First Answer
  • Commenter

모두 보기

참여 게시물
보기 기준

답변 있음
Multiplying elements of a vector
Replace case num == 1 by case 1

8일 전 | 0

답변 있음
Time format in netcdf files
"I want to extract time series from a netcdf file but the time format is like this: " Why "but", that's the way date-time is st...

8일 전 | 0

답변 있음
Why does exceeding array index in this program not show an error?
Because there are values of the second index, which exceeds 1000 (as you have noticed) K>> (kk+1)*R:-1:kk*R+1 ans = Columns...

10일 전 | 1

답변 있음
Trying to find row number in a large matrix
Your one-liner is missing a closing parentheses and Matlab proposes an improvement rigth-clicking "find" opens a context menu...

11일 전 | 0

| 수락됨

답변 있음
Property assignment is not allowed when the object is empty. Use subscripted assignment to create an array element.
I fail to reproduce the error you report. However, that should not surprise since your description of how you execute the classe...

13일 전 | 0

| 수락됨

답변 있음
How to write a matrix m.file?
Without syntatic sugar >> data = cat( 2, reshape((42:-7:7),[],1), reshape((3:6:33),[],1) ) data = 42 3 35 9 ...

15일 전 | 0

| 수락됨

답변 있음
List of built-in functions?
On R2018b, Win10 and a SSD, this code %% tic sad = dir( fullfile( matlabroot, 'toolbox', 'matlab', '**', '*.m' ) ); %% for ...

15일 전 | 0

| 수락됨

답변 있음
Finding last non-zero rows for individual columns of a matrix without loops
Try this [r,c] = find( A==0 ); [~,ixa] = unique( c, 'last' ); >> r(ixa) ans = 3 4

16일 전 | 1

| 수락됨

답변 있음
Average data by time
I encountered two problems with the csv-file the first line, which I just deleted the strings, NA, which I replaced by nan ...

19일 전 | 0

| 수락됨

답변 있음
Quick removal of records in structure
Caveat: I don't fully understand your use case. I assume that "record" is what in the documentation is called "element of st...

19일 전 | 0

답변 있음
How do I detect line number while reading a file?
There is no function that takes the output of ftell() and returns the line number. One has to keep track of the line number wi...

21일 전 | 0

| 수락됨

답변 있음
a figure with only a numeric value
Is this close to what you are asking for? lh = plot( 0.5, 0.82, 'd' ); ah = lh.Parent; ah.XTickLabels = cell(1,1); ah.YTickL...

27일 전 | 0

| 수락됨

답변 있음
Plotting datetime from dataset
You may specify the format of the time axis in the plot command. See the documentation of plot() %% Create some data that resa...

약 1달 전 | 0

답변 있음
Rounding date time to nearest half hour wihtin a table
An alternate way %% A slightly modified example from the documentation MeasurementTime = datetime({'2015-12-18 08:03:05';'2015...

약 1달 전 | 0

| 수락됨

답변 있음
How to count the number of times I called a function (using the command line)
You could replace counter=0; %Initializing counter by persistent counter if isempty( counter ) counter=0; %Initializin...

약 1달 전 | 0

| 수락됨

답변 있음
Is it possible to have an array of function handles?
The short answer is no. However, it's possible to store function handles in a cell array. f = cell(2,1); f{1} = y1prime; f{2...

약 1달 전 | 0

| 수락됨

답변 있음
This statement is not inside any function. (It follows the END that terminates the definition of the function "extract_tiff".)
There are two end at the end of the function. k=k+1; end end Remove one of them

약 1달 전 | 0

답변 있음
Can I control filter command?
Yes, filter() is possible. Try y = filter( 1, [1,1], x );

약 1달 전 | 0

| 수락됨

답변 있음
Creating a row vector of noisy data.
A naive code noise = 2.0 * randn(1,100); noise = noise .* (2.0./std(noise)); std( noise ) ans = 2 a bit closer...

약 1달 전 | 0

답변 있음
Extracting column from text file
This is a fixed-width text file. The documentation includes a good description on how to read fixed-width text files. See fi...

약 1달 전 | 0

| 수락됨

답변 있음
Sorting numbers according to elements of an array
Without comment: >> [~,ix]=min(abs(SORTING-input)) ix = 1 >> SORTING(ix) ans = 3 >> >> [~,ix]=min(abs(SORTING...

약 1달 전 | 1

답변 있음
how to debugg the error : size input must be integers
"how to debug" Before trying to fix the problem see: Debug a MATLAB Program Next set Pause on Errors and run Section_...

약 1달 전 | 0

답변 있음
Does matlab create pointers to objects or create new copies?
See Comparison of Handle and Value Classes

약 1달 전 | 1

| 수락됨

답변 있음
Namespace management for packages+sub-packages
Yes, that's the way it is. And sprinkle the code with import doesn't really help. Nevertheless, I find packages useful. A bett...

약 1달 전 | 0

답변 있음
Mean command gives wrong answer
Analyze this %% x=[1,2,3,4,5,6,7,8,9,10,11,12]; % x values y=[15,120,2,30,40,150,60,170,80,9,15,1000]; % y values %% idx1 =...

약 1달 전 | 1

| 수락됨

답변 있음
Are enum-comparisons slow in MATLAB?
Indeed, enumerations make slow code. This is an anecdote about a code based on enumeration that proved useless because of poor...

약 1달 전 | 0

| 수락됨

답변 있음
Basic queries Matlab (vectors, indexing, construct matrices in a specific form)
Exercise 1 and 2 "[...] however it confuses me the way the question is written!" Agree; the very same vector has three differe...

약 1달 전 | 0

| 수락됨

답변 있음
keep element greater than immediate previous element
An alternative %% x = [1 2 3 4 3 2 3 4 6 8 5 5 6 8.5 9 11 12 ]; %% dx = 1; while not( isempty( dx ) ) dx = fin...

약 1달 전 | 1

답변 있음
How to reduce computation time
On R2018b and a new vanilla PC I found a significant decrease in computation time by replacing quad2d() by integral2() (with the...

약 1달 전 | 1

답변 있음
How can I write a variable which datatype is a string in netcdf file
Most likely, the space you specified for the variable calibration_procedure in the nc-file, i.e. 'Dimensions',{'hydrophone_cou...

약 1달 전 | 0

| 수락됨

Load more