Community Profile

photo

per isakson


Last seen: Today

KTH

2,284 total contributions since 2010

Contact

per isakson's Badges

  • 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

View all

Contributions in
View by

Answered
Particularly strange bug using the eval function
I reproduced the issue you report on R2018b, Win10. I noticed that if I put a breakpoint at the line "class(gamma)" run the f...

1 day ago | 0

| accepted

Answered
How do I debug my matlab code?
How do I debug my matlab code? Before trying to fix the problem see: Debug a MATLAB Program, then add a breakpoint to line 34,...

2 days ago | 1

| accepted

Answered
How to pass field values to subclass from superclass?
There are syntax errors in your code. Try to keep the little box in the upper right corner, , green at all time. I've fixed y...

4 days ago | 0

| accepted

Answered
How to read values for the range between each maximum and each minimum from a large uneven data file?
"range between the maximum and minimum of column 3" with a bit of guessing my interpretation is implemented in ixb and ixe %% ...

7 days ago | 0

| accepted

Answered
how to read day of the year as datetime ?
>> chr = sprintf( '%d', 2019364 ); >> sdn = datenum(str2double(chr(1:4)),1,0)+str2double(chr(5:end)); >> datetime( sdn, 'Conve...

9 days ago | 0

Answered
Code is running very slow, how to make faster?
Caveat: I've never seriously used the Live Editor. I've undertaken the following steps uploaded your files to a new folder, wh...

9 days ago | 2

Answered
Multiplying elements of a vector
Replace case num == 1 by case 1

1 month ago | 0

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

1 month ago | 0

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

1 month ago | 1

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

1 month ago | 0

| accepted

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

1 month ago | 0

| accepted

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

1 month ago | 0

| accepted

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

1 month ago | 0

| accepted

Answered
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

1 month ago | 1

| accepted

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

2 months ago | 0

| accepted

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

2 months ago | 0

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

2 months ago | 0

| accepted

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

2 months ago | 0

| accepted

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

2 months ago | 0

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

2 months ago | 0

| accepted

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

2 months ago | 0

| accepted

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

2 months ago | 0

| accepted

Answered
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

2 months ago | 0

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

2 months ago | 0

| accepted

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

2 months ago | 0

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

2 months ago | 0

| accepted

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

2 months ago | 1

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

2 months ago | 0

Answered
Does matlab create pointers to objects or create new copies?
See Comparison of Handle and Value Classes

2 months ago | 1

| accepted

Load more