Community Profile

photo

per isakson


KTH

2,065 total contributions since 2010

Contact

per isakson's Badges

  • Revival Level 3
  • Ace
  • 36 Month Streak
  • Thankful Level 3
  • Knowledgeable Level 4
  • First Answer
  • Leader
  • Speed Demon
  • Promoter
  • Commenter
  • Solver

View details...

Contributions in
View by

Answered
Integer check
function isf = isflint( m ) % floating double only % % http://www.mathworks.com/company/newsletters/news_notes/pd...

약 9시간 ago | 0

Answered
Is vaderSentimentScores available in R2019a
No, vaderSentimentScores was Introduced in R2019b. See bottom of the page.

약 15시간 ago | 0

| accepted

Answered
Regexp lookbehind and lineanchors
"My intent is to match 'c' that is preceded by the beginning of a line and zero or more white character." In the character arra...

약 18시간 ago | 0

| accepted

Answered
How to use a percentage number time with a matrix
matrix * (100-10)/100

약 20시간 ago | 0

| accepted

Answered
Matrix Dimensions Must Agree
Is this a copy&paste error? W=imread('copyright1.png'); I=imresize(I,[300 300]); Replacing the line by W=imread('copyright1....

1일 ago | 0

Answered
Opening R2018b .m files in R2019b
Most likely the reason is that your search path of the R2018b installation is not carried over to the R2019b installation. See S...

1일 ago | 0

Answered
selecting rows from C with associated values in D, while using A and B values as references to produce E and F matrices
The script %% ixe = [1,4,7]; E = cat( 2, D(ixe), C(ixe,:) ); ixf = setdiff( [1:7], ixe ); F = cat( 2, D(ixf), C(ixf,:) ); ...

2일 ago | 0

Answered
Append rows to .mat file
See save(filename,variables,'-append') matfile Access and change variables directly in MAT-files, without loading into ...

3일 ago | 0

Answered
How to import textdata & data from Excel spreadsheet into Struct, using for loop?
What is the size of SBOB ? The for-loop % % Let this be for BOB % for i = [12:14,44:60,71:82] % filename1{i} = sprintf('...

3일 ago | 0

Answered
Method to GREEDILY select an optional text using regular expressions?
Try %% nfolders = { 'UD_epoch' 'UD_Epoch' 'epoch' 'Epoch' 'U...

3일 ago | 1

Answered
Calculating storage required to store any certain array(nxn) in the .Mat file ?
Try whos -file matlab.mat See whos, List variables in workspace, with sizes and types

4일 ago | 0

Answered
Assigning letters to numbers
"assign letters to numbers but in reverse (A = 26, B=25, etc)" Why not start by making a function that takes letters and return...

7일 ago | 0

Answered
Variable highlighting isn't working
I guess the problem is with the meaning of "Variables with shared scope". See Check Variable Scope in Editor The gui you refer ...

8일 ago | 1

Answered
Where should we install third-party toolboxes under Windows?
That depends Are you connected to a local network? Do you have a your own drive on a local server? Are the local workstation...

10일 ago | 1

Answered
Call function by path or namespace?
That's a good question. These two Matlab blogs Simple Namespaces and Brilliant Function Handles A conversation about managing ...

13일 ago | 0

| accepted

Answered
What frustrates you about MATLAB?
Background While experimenting with a function, which I had downloaded from FEX, I encountered the error No such file or dire...

28일 ago | 0

Answered
What's the best way to open and read a .out file in MATLAB?
If the file contains columns of data, you may want to try the interactive tool Import Data Notice that this tool can generat...

29일 ago | 0

Answered
Is there a way to continue operation during input()?
Something like %% a script named cssm.m while true user_input = waitinput( 'prompt: ', 5, 's' ); if isnan( user_inp...

30일 ago | 0

Answered
how to re-assign variable within for loop
A long shot. Replace table=[data1;data2] by if i == 0 table = data1; end table = [table;data2]; %#ok<AGROW> data1 = ...

30일 ago | 0

| accepted

Answered
How to use textscan on a cell array without a loop?
Am I on the right track? Run %% mystruct.out = { '%ACCDA,50,123.99,W,07512.001,E,2,11,2.2,1002.2,Z,,,,*22' ...

약 1달 ago | 1

Answered
How to replace values above a given percentile by nans
Ignore the NaNs explicitely when calculating the percentile. Try %% % Table with nan t = array2table(vertcat(horzcat([1:1000...

약 1달 ago | 0

Answered
how to access abstract class in matlab
I'm not sure, I exactly understand what you mean. However, I try "how can I access this abstract class" You cannot "access" an...

약 1달 ago | 0

| accepted

Answered
Updation of Cell Array
Is something like this what you are looking for? I don't quite understand what you tried. Try this code %% Sample data cell...

약 1달 ago | 0

| accepted

Answered
how to assign multiple strings to single variable
Try >> jan = arrayfun( @(num) sprintf('jan_%4d',num), (1958:2018), 'uni',false ); >> jan(1:3) ans = 1×3 cell array {'...

약 1달 ago | 0

| accepted

Answered
Reading a complex text file and building a matrix
Try this %% chr = fileread( 'example.txt' ); clusters = strsplit( chr, '--- detector1 ---\r\n' ); clusters(1) = []; clear('...

약 2달 ago | 1

| accepted

Answered
How to remove 'middle' elements from a vector?
Try A( A>=2 & A<=7 ) = []; and see Logical indexing

약 2달 ago | 1

| accepted

Answered
Sorting a structure array
Hint: This script sorts with regard to the leading group of digits (converted to numeric) %% SubFold = { '1._0.005._0.2_.4._2...

약 2달 ago | 1

| accepted

Answered
using fprintf for answers
This supplements Walter's answer. Replace fprintf('\r\r%s\n', 'Strain Tensor\n') by fprintf('\r\r%s\n', 'Strain Tensor') ...

약 2달 ago | 1

Answered
specific pattern from the file name
These statements %% chr = 'abcdd-22_Z12'; cac = regexp( chr, '(?<=_)Z\d{2}', 'match' ); cac{:} return ans = 'Z12' ...

약 2달 ago | 0

| accepted

Answered
Creation of a text file with a series of record set
Try cssm1() dbtype test.txt 1:14 where function cssm1() fid = fopen( 'test.txt', 'w' ); assert( fid >= 3 ) ...

약 2달 ago | 0

| accepted

Load more