Community Profile

photo

per isakson


Last seen: Today

KTH

2,289 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
'Unable to open file' error with importdata
Replacing Spill = importdata(filename); with Spill = importdata( fullfile( pathname, filename ); may help.

16 hours ago | 0

| accepted

Answered
Access to class members
The Code Analyzer is a useful feature. It indicates syntax errors in the rightmost column of the editor. And it provides tooltip...

2 days ago | 0

Answered
Issue with defining inputs in classdef and getting properties updated
Two things: VirtualMotor is a value class. Is that your intention? See Comparison of Handle and Value Classes You don't want ...

2 days ago | 1

| accepted

Answered
How can I see very large data in a workspace
This works with R2018b >> cac = {rand(1104,2,292)}; >> openvar('cac{1}(:,:,290)') P.S. It works with 1400x2x290 too

3 days ago | 0

| accepted

Answered
Conversion of Cell elements to matrix elements
Matlab magic %% x{1,1}=[1,5,3]; x{1,2}=[2]; x{1,3}=[]; x{2,1}=[2,4]; x{2,2}=[5,3,1]; x{2,3}=[]; %% cellfun( @(v) sum(v...

5 days ago | 0

| accepted

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

11 days 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,...

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

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

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

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

19 days ago | 2

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

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

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

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

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

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

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

2 months 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

2 months 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

Load more