Community Profile

photo

per isakson


Last seen: Today

KTH

2,319 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
Index exceeds the number of array elements (2). Error (line 41)
dy_v is a row vector with length two dy_v= [0.33 -1.5]; The end value, n+1, of this loop is 4 %% Create Vector B for i=1:...

2 days ago | 0

Answered
Create index between values
Study this %% a = [0,1,0,2,0,2,1]; ixb = find( a==1, 1,'first'); % begin ixe = find( a==2, 1,'last'); % end %% b = zeros(...

3 days ago | 0

| accepted

Question


Help me read the doc on matlab.fonts Settings
Background I use the font, Inconsolata, in the Command Window and the Editor. It's very readable (imo), however there is a pro...

4 days ago | 1 answer | 0

1

answer

Answered
Array instead of one value in loop form
I assume that you want to iterate over the loop for the 27 values, i=[1,2,3,...,27]. That is exactly what for i=1:27 does. (The...

8 days ago | 0

| accepted

Answered
How to effectively check a list of variables for existence and then check "isvector"
Maybe it's good enough to run >> whos data* Name Size Bytes Class Attributes data1 0x0 ...

8 days ago | 0

Answered
Index in position 1 exceeds array bounds (must not exceed 1)?
I replaced the inner for-loop by for n=1:(T/steg) f01 = idenmat - steg*theta*A; f22 = quart...

12 days ago | 1

| accepted

Submitted


m2uml
m2uml generates UML class diagrams from m-code

19 days ago | 52 downloads |

Thumbnail

Answered
Need help on matlab table
Assumption: You have a text file that contains exactly the five lines of text formatted as code in your question. Run the func...

19 days ago | 0

Question


How to Contact File Exchange Admin?
I try to update a FEX submission, but The previous version is a zip-file and now I try to replace that with a mltbx-file.

24 days ago | 1 answer | 1

1

answer

Answered
matlab fprintf error? please help
Most likely, fid = fopen(...), failed and return a negative value to fid. Replace fid = fopen(sprintf('%s/Timeseries.ROIs/%...

24 days ago | 0

Answered
sum separate continuous values
%% d = diff( c ); ixb = find( d == +1 ) + 1; ixe = find( d == -1 ); %% is_group = ixe >= ixb + 1; [ ixb(is_group), ixe(i...

25 days ago | 0

| accepted

Answered
How to use "dir"?
Renam the folders 'Inst1', to, 'Inst01', etc. or see natural order.

1 month ago | 0

Answered
The loop does not take all values
I cannot reproduce the issue that you report. You didn't show us the error message! There is an error message? First, I tidied ...

1 month ago | 1

| accepted

Question


Why does web('name.html','-new') open the html-file in the Help browser?
Experiments with R2018b show that web('name.html','-new') honors the Matlab documentation and displays 'name.html' in the Matla...

1 month ago | 0 answers | 0

0

answers

Answered
How to read strings from a txt file?
The text file, model.txt, contains the five lines given in your question. The script fid = fopen( 'model.txt' ); cac...

1 month ago | 0

| accepted

Answered
find the minimum value of y for positive vales of x
Try this %% x = (-100:100); y = x.^3+60*(x.^2)-50; %% xmin = min(y(x>0)) which returns xmin = 11 >>

2 months ago | 0

| accepted

Answered
Looping through a random matrix to see if any element is >0.5
Try %% for random_number_matrix = rand(4,8) display (random_number_matrix) end and read the documentation on for

2 months ago | 0

Answered
How to combine multiple columns into array?
Two ways array = cat( 2, col1, col2, col3, col4, col5 ); array = [ col1, col2, col3, col4, col5 ];

2 months ago | 0

| accepted

Answered
How to write properties in vectors in matlab oop?
P(1)=obj.lcc; P(2)=obj.rc; P(3)=obj.mc; where obj is the instance variable

2 months ago | 0

| accepted

Answered
Matlab reads file with different order
>> fid = fopen('RQ_par.txt'); >> fs = fscanf( fid, '%f' ) fs = 0.9011 0.848 0.6744 0.54 ...

2 months ago | 0

| accepted

Answered
Extracting length information of pattern from specific string (not fixed string)
This is an answer to the follow_up question, which was closed when I tried to submit. %% chr = '010100001111111111111110000010...

2 months ago | 1

Answered
reading a huge matrix which is split to several parts
The text file contains column and row numbers together with blocks of the matrix. These row and column numbers can be used for c...

2 months ago | 0

| accepted

Answered
.mat file to .txt file
A little demo >> i16 = ones( 12, 1, 'int16' ); % sample data >> fid = fopen('i16.txt','a'); >> fprintf( fid, '%6d\n', i16 ...

2 months ago | 0

Answered
My codes and functions are deleted
AFAIK: There is no magic way to find lost files. Maybe you saved them in the wrong place? Or renamed them? What do you know ...

2 months ago | 0

| accepted

Answered
How can I get the path of the file being loaded when implementing the loadobj method
A little demo >> clearvars >> create_and_save_mock_obj >> load_mock_obj The obj was loaded from D:\m\cssm\load_mock_obj.m s...

2 months ago | 0

Answered
MATLAB Answers Wish-list #5 (and bug reports)
Don't encourage the use of "matlab" and "simulink", by showing them as popular tags. Instead, encourage the use of the Product f...

2 months ago | 2

Answered
Reading mixed format data from '.txt' file in matlab
Here is an alternative Running >> out = cssm('cssm.txt') outputs out = struct with fields: george: [3×11 double] ...

2 months ago | 0

Answered
What frustrates you about MATLAB? #2
Which do you prefer 'MultipleDelimsAsOne' or 'CollapseDelimiters'? Now and then I use the correct name in the wrong place. I ...

2 months ago | 1

Answered
Reading large number of csv files
Caveats My notion of your use case (work flow) is vague. Is your local free disk space a restriction? How many GB in total will...

2 months ago | 0

| accepted

Answered
Nested Functions vs Object-Oriented Programming: k-D Tree example and relative performance
On my R2018b,Win10 the diffence is even bigger % 18.585, 0.79143 % 18.937, 0.75923 The profiling result of get_root...

2 months ago | 1

| accepted

Load more