Community Profile

per isakson


KTH

2,221 total contributions since 1999

Contact

per isakson's Badges

  • First Answer
  • 
  • Knowledgeable Level 4
  • 
  • Revival Level 2
  • 
  • Guiding Light
  • 
  • Thankful Level 3
  • 
  • 36 Month Streak
  • 

View details...

See 5 Cody Badges

Contributions in
View by

Answered
long title problem printing
Two lines title({'First line';'Second line'}) Smaller font size h = title( 'abc' ) h.FontSize = 9; And Walter...

7 days ago | 0

Answered
How can I do the following with MATLAB Editor
# Unknown in the Matlab world. Who would want that ;-) # Good question. See <https://se.mathworks.com/help/matlab/matlab_env/...

7 days ago | 1

| accepted

Answered
How do I dynamically generate a variable name for individual saving of temporary data into separate MAT files?
Doc on *|save|* says: Save the fields of structure s1 as individual variables in a file called newstruct.mat. sav...

7 days ago | 1

| accepted

Answered
Functions as function inputs with specified inputs
* See <https://se.mathworks.com/help/matlab/matlab_prog/creating-a-function-handle.html Create Function Handle>. Very useful and...

8 days ago | 1

Answered
Parse text file???
Similar questions have been answered by me and others, e.g. <https://se.mathworks.com/matlabcentral/answers/312599-how-do-i-pars...

10 days ago | 1

| accepted

Answered
textscan 4th row into one string
One way using *|textscan|* fid = fopen( 'U:\EMC\SMI8A_75_FA.csv', 'r' ); result = textscan( fid, '%s', 1, 'headerlines',...

12 days ago | 0

| accepted

Answered
How to sort strings by lenght?
Without using a cell array >> A = ['adam ' 'bertil' 'cesar ' 'Ada ' 'berit '...

13 days ago | 0

Answered
Matching based on the first word
Yes, try this match = cssm() match = 0 1 0 0 0 0 0 0 1 A_list items o...

13 days ago | 1

Answered
Code takes forever to run and will never fully execute? Any tips to get it to run faster?
The profiler, which you call in the beginning of the script, tells you loud and clear to preallocate sevaral variables. See <htt...

14 days ago | 0

Answered
For loop not working properly
Your code is sluggish. Preallocating variables, which the Code Analyzer proposes, would improve speed. * I put your code in a...

14 days ago | 0

Answered
How to solve the error in this code??
The error is caused by xor( Xd, Ud(:,end) ) The R2017b doc on *|xor|* says Input arrays, specified as scalars, vect...

14 days ago | 0

| accepted

Answered
Folks: My program (below) does not return an error message, it does open a plot window, but no graph/data is plotted. I am not sure why. Thank you for your help. H Daniel
Plotting *one* value at a time as line doesn't work. Line is default. Two values are needed to make a line. Replace plo...

16 days ago | 0

| accepted

Answered
does the GUI read scripts?
* _"I am a PhD student and working on some traffic counting cards, the card has around 2900 rows ..."_ &nbsp; (excerpt from one ...

17 days ago | 0

| accepted

Answered
Error in storing the output of sprintf in a cell array
>> a{1}=sprintf('%s',name) Cell contents assignment to a non-cell array object. because *|a|* is assigned a string cons...

18 days ago | 0

| accepted

Answered
I need to store the values from calculation in the for loop instead it's given me a new value everytime
Replace filtEMG=((sqrt(sum(EMG(n:window+n).^2))/window)*20); by filtEMG(n) = ((sqrt(sum(EMG(n:window+n).^2))/wind...

18 days ago | 0

Answered
Finding and saving identical rows in a matrix
I have an idea and that's (the two leftmost columns contain whole numbers) >> [C,ia,ic] = unique(A(:,1:2),'rows'); >> ...

19 days ago | 1

Answered
Fastest way to access another matrix for all nonzero rows
>> B( all( A==0, 2 ), : ) = 0 B = 8 9 3 0 0 0 9 2 0 0 0 0

19 days ago | 0

| accepted

Answered
how to use the str2num for the whole array at once
_"I have older than what Mr Walter said"_ &nbsp; Thus the old way Read the file and convert the content to an old time string...

21 days ago | 0

| accepted

Answered
How to name every row of 100*2500 matrix?
_"So all I want is as followings"_ &nbsp; See <https://se.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-shou...

22 days ago | 0

| accepted

Answered
How can I write data to a text file using the symbol '/' in the end?
_"keep dlmwrite"_ &nbsp; That's not possible - AFAIK Doc says: dlmwrite(filename,M) writes *numeric* data in array M to an AS...

23 days ago | 0

| accepted

Answered
How to import big data files
_"running for a couple of hours"_ &nbsp; that doesn't sound right. * How many columns are there? * How much RAM do you hav...

24 days ago | 0

| accepted

Question


When was 'tokenize' dropped from regexprep?
With R2016a I get this warning >> regexprep( 'abc123def', '(\d{3})', '.$1.', 'tokenize' ) Warning: The 'tokenize' op...

27 days ago | 1 answer | 1

1

answer

Answered
Find cell containing part of a string
>> find( ismember( colorList, strsplit( stringToCheck ) ) ) ans = 3 or >> find( ismember( colorList, s...

27 days ago | 2

Answered
How to store values as array
There are a couple of mistakes in your code. Try this k = nan( 1, nn ); % pre-alloctate memory for ii = 1 : nn ...

27 days ago | 0

| accepted

Answered
changing minutes after midnight into a datetime array
_"but I only need the MI"_ &nbsp; I don't think you can avoid the date and time. X = 60*[1,2,3,4,5,6,7]; T = datetime( X...

28 days ago | 1

| accepted

Answered
Undefined function "......" for input arguments of type 'double'
The cause to this error message may be one of * typo, you have misspelled the name of the function * the function cannot be...

29 days ago | 1

Answered
How to obtain a set of matrix from another matrix by adding the previous row value along the column to the next row on the same column
Is this what you want? >> cumsum( a, 1 ) ans = 2 4 5 8 7 9

30 days ago | 0

| accepted

Answered
Create an array of strings
>> fruit = {'apple', 'cherry'} fruit = 'apple' 'cherry' with curly braces creates a cell array of strings. I ...

1 month ago | 1

| accepted

Answered
Can't create hdf5 file using batch scripts.
The function, *|strcat|*, has no effect in the statement file_name = strcat('/home/usr/test_results1'); which is equival...

1 month ago | 0

Answered
Testing private functions in classes
First goggle "test private method" and read about why you should *not do it* (and a few ways to do it). One way (for handle ...

1 month ago | 0

| accepted

Load more