Community Profile

per isakson


KTH

2,161 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
Memory problem reading data in large netcdf files for a single variable
Am I correct that you want to calculate the statistical measures (min, max, etc.) for 684x447 time series of 3250 hours length (...

2 hours ago | 0

Answered
Converting a string Array into a Char array
_"My intentions are to graph time vs. temp."_ %% [date, time, temp ] = textread('h:\m\cssm\data.txt','%s %s %f', 8 ); ...

6 hours ago | 0

Answered
how to subplot data from two matrix using for loop?
Problems with your code * *|A(i)|* outputs a scalar. You want *|A(:,i)|*, which outputs the i:th column * your code displaye...

1 day ago | 0

| accepted

Answered
How do I go about using my MATLAB knowledge and transfer that to real world applications?
*MATLAB*   The Mathworks have developed the Matlab programming language significantly over the last decade. Opinions expres...

3 days ago | 0

| accepted

Answered
Function [output]=FunctionName(input)
Go to <https://uk.mathworks.com/help/matlab/matlab_prog/create-functions-in-files.html Create Functions in Files> and look for *...

5 days ago | 1

| accepted

Answered
Importing cnv file with header lines
Given * the entire file fits in a fraction of the memory * **END** is the last line before the numerical part of the file. ...

13 days ago | 1

| accepted

Answered
How do I make a list of objects that have specific properties?
An alternate approach %% Create some data loc = randi( [double('A'),double('D')], 1,8 ); loc_str = arrayfun( @char, l...

15 days ago | 0

Answered
Operations on variables with specific naming patterns
It's easier to say that dynamically named variables and *|eval|* is not a good idea than making recommendation regarding a desig...

21 days ago | 0

| accepted

Solved


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

21 days ago

Solved


Sort numbers by outside digits
Sort the array so that they are sorted as if their value was a 5 digit number made from the first three and last two digits of t...

21 days ago

Answered
How to convert .mat file into text file in a specific format ?
I assume that the mat file contains a cell array named, *|x|* %% x={ 0.000000, 0.000000 0.500000, 0.333333 ...

22 days ago | 0

Answered
reading a txt file including dash
One way %% fid = fopen( 'DI_WATER.txt' ); cac = textscan( fid, '%f%f%f%f%f%f%f%f' ... , ...

24 days ago | 0

| accepted

Answered
What's the cost of overwriting a variable versus clearing it every time it changes?
Comments * don't speculate; make a test * make it a habit to use the function, *|profile|* * see <http://wiki.c2.com/?Prem...

24 days ago | 2

| accepted

Answered
How to remove first charachter from a string inside a cell
One way with R2016a >> load 20_SVO.MAT >> data_SVO(:,3:4) = regexprep( data_SVO(:,3:4), '\$', '' ); >> data_SVO da...

25 days ago | 0

| accepted

Answered
How to convert from cell array to multidimensional array?
Loops are allowed if one remember to pre-allocate %% num = nan( 7, 7, 6, 10000 ); for jj = 1 : 10000 num(:,:,...

26 days ago | 1

| accepted

Answered
Really easy one how to quickly repeat columns in an array
C = (1:10)'; M = repmat( C, [1,10] ); inspect the result >> whos C M Name Size Bytes Class ...

29 days ago | 0

Answered
Seperating strings and numbers using xlsread
Loops are allowed >> [ str, num ] = cssm0(); >> whos str num Name Size Bytes Class Attributes...

1 month ago | 1

| accepted

Answered
How to store two tables resulting from a for loop
Yes, with something like this for jj = 1 : 2 T = something; filename = sprintf( 'myfile_%d', jj ); w...

1 month ago | 0

| accepted

Answered
How to verify input only contains certain numbers?
An idea >> b={'37', '36', '35'}; >> all( strcmp( unique( b ), {'35','36','37'} ) ) ans = 1 However, you h...

1 month ago | 0

| accepted

Answered
Get full path of directory that is on Matlab search path
One way >> s = what('InUse'); >> s.path ans = h:\m\FEX\InUse where *|InUse|* is a folder on my Matlab path

1 month ago | 2

| accepted

Solved


Space Saver
Remove all characters that are below a space in ASCII value.

1 month ago

Answered
How to read file with complex number as well as real numbers
If _"huge"_ is a fraction of the size of the memory: %% str = fileread( 'try_file.txt' ); ixc = find( str=='(', 1, 'f...

1 month ago | 1

| accepted

Answered
Read data from file
Two variants %% fid = fopen( 'cssm.txt' ); cac = textscan( fid, '(%d,%d) (%d,%d)', 'Whitespace','' ... ...

1 month ago | 0

| accepted

Submitted


A Notepad++ function list for MATLAB
Displays Methods and Functions of an m-file in a Tree View Control in the Notepad++ IDE

1 month ago | 5 downloads |

Thumbnail

Answered
how to import CSV file (problem with wrong written file)
I've done an experiment with regular expression on R2016a. I encountered a problem. (?m), 'lineanchors' doesn't work as document...

1 month ago | 1

Answered
I'm trying to import a data set into Matlab without success. See attached file.
One way %% ffs = 'june 12th Crypto datatofidgetwithonmatlab.csv'; %% fid = fopen( ffs, 'r' ); fmt = [ '"', repm...

1 month ago | 0

Answered
How to write a mixed data (text and number) in a CSV file ?
%% matrix1 = {'water';'space';'fire'}; matrix2 = [100;200;300]; %% fid = fopen( 'matrix.csv', 'w' ); for jj = 1...

1 month ago | 0

Answered
How can I make matlab editor wrap long comments?
It works for me on R2016a. The wrapping of comment lines are controlled by Preferences > Editor/Debugger > Language > Com...

2 months ago | 1

Answered
Import csv file with date and time in AM/PM format
Try this format >> str = 3/13/2017 11:20:00 PM >> cac = textscan( str, '%{MM/dd/yyyy hh:mm:ss a}D', 'Delimiter',',', ...

2 months ago | 0

| accepted

Answered
Parsing a file with comments and several blocks
_"... a RE that will parse each block into a header row and data ..."_ &nbsp %% str = fileread( 'cssm.txt'); % cssm.t...

3 months ago | 0

| accepted

Load more