Community Profile

photo

per isakson


Last seen: Today

KTH

2 375 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
Change [ ] cells in .mat file to NaN
I don't fully understand your question. See: TUTORIAL: how to ask a question (on Answers) and get a fast answer "The code bel...

en dag ago | 0

Answered
How do I append a row average to a new matrix
With a little bit of guessing. Does this answer your question? %% foo = randi(500,500); cac = mat2cell( foo, 5*ones(100,1), 5...

3 dagar ago | 1

| accepted

Answered
Preventing too many function inputs
>> exfunction(1,3,9,4,5) throws the error Error using exfunction Too many input arguments. I assume that's the error you e...

3 dagar ago | 0

Answered
MATLAB Answers Wish-list #5 (and bug reports)
Activity Feed: "See more" asks for "See less".

11 dagar ago | 1

Answered
How to modify few numbers in a random text file?
Try this %% chr = fileread('model_v2.txt'); ffs = 'model_out.txt'; fid = fopen( ffs, 'w' ); [~] = fprintf( fid, chr, 1.2, 3...

20 dagar ago | 0

Answered
How to replace elements of a cell array using a containers.Map
With string and arrayfun on R2018b %% names_to_replace = ["TonnageDeBSA", "D__bitD___eauAuBSA", ... "Pres...

23 dagar ago | 0

Answered
How can I keep asking the user for correct input even after they press enter?
Use strcmpi( Ready, 'ready' ) instead of Ready== 'ready' | Ready== 'Ready' Don't use == in combination with character array...

26 dagar ago | 1

Answered
How can I concatenate multiple CSV file and turn into one CSV file
A alternate idea (that wrongly(?) concatenates the the files vertically) Pro avoids converting to numerical and back to text (...

27 dagar ago | 0

| accepted

Answered
Changing the values of a column in a table.
This statement does it tbl.t = tbl.t(ones(height(tbl),1)); % once refered to as "Tony's trick" Example: %% Create a sampl...

28 dagar ago | 1

Answered
How to replace specific text in .csv file
Another approach, which avoids conversion to numerical and back to text. (And, I think, works with R2006 and later releases.) %...

28 dagar ago | 1

| accepted

Answered
Question about accessing data in a nested struct
It is impossible (for me) to help based on the little information that you provide. Here (R2018b) it works fine. >> sas = xml_...

29 dagar ago | 0

| accepted

Answered
How do I set a class property?
This might help as a start >> vec = vector; >> vec.v1 ans = 120 >> where classdef vector properties v1 ...

30 dagar ago | 0

| accepted

Answered
Unknown File/Folder in directory
"What does this mean, I dont Understand." I assume that you refer to 34 and 36, respectively. Main_File is a struct array with...

ungefär en månad ago | 0

| accepted

Answered
Select Specific NC Files in Folder Using Date Included in Filename
Something like this should do it matrix = [ 6, 4, 1980 6, 4, 1981 ]; dates = string( datestr( [matrix(:,[3,1,2...

ungefär en månad ago | 1

Answered
clarification in for loop with intervals
Someting like this %% indicies = {[55:1:65], [125:1:145], [201:1:225]}; for jj = 1 : numel( indicies ) for kk = indicies...

ungefär en månad ago | 0

| accepted

Answered
How to add an element to cell?
One way >> the_cell={'January','March','April'}; >> the_cell = cat( 2, the_cell(1), {'February'}, the_cell(2:end ) ) the_cell...

ungefär en månad ago | 0

| accepted

Answered
how to change the number that decreases in the array element to the same number, for example 0 (zero)
Is something like this what you are asking for? %% a = [100.001469926008 0.0140073495254864 0.00452326089811489 ... ...

ungefär en månad ago | 0

Answered
Why I get this error for my code?Error: File: Untitled2.m Line: 10 Column: 8
Replace x2=x1. / max(x1); by x2=x1 ./ max(x1); Be careful with where you add spaces

ungefär 2 månader ago | 1

| accepted

Answered
Convert char to variable
"by means of OOP, to create an app" Object Oriented Design isn't easy and there are many different solutions to a problem. I ...

ungefär 2 månader ago | 0

| accepted

Answered
Importing Data from Text File Loop
First you need to create an array of file specifications. I prefer to use the function dir() glob = fullfile( "C:\Users\nperson...

ungefär 2 månader ago | 0

Answered
Extending the number of terms in a specific sequence.
A copy&paste mistake: synth_f1 = synth_f1 - (1/(n*n))*sin(n*w*t) + (1/((n+2).^2))*sin((n+2)*w*t); % ...

2 månader ago | 1

Answered
Accessing subclass methods from abstract superclass
This is not what you ask for, but close. (I don't think what you want is possible with Matlab.) >> child = ChildClass(); >> ch...

2 månader ago | 1

Answered
Best way to truncate imported data so the plot displays the area of interest
One simple interactive way (R2018b) %% some data noise = rand( 0.5e6, 1 ); roi = 4.5*sin( (1:5e3)/(20*pi) )'; data = [ noi...

2 månader ago | 0

| accepted

Answered
Import hours from a excel file
It can be done with https://se.mathworks.com/help/matlab/ref/duration.html. , but that requires more reading of the documentatio...

2 månader ago | 0

Answered
Combining Matrices into one
"I have 20 matrices" are those <68x68 double>? "matrices" implies that. If yes, try %% numfiles = 29; Ws = nan(68,68,numfi...

2 månader ago | 0

Answered
What frustrates you about MATLAB? #2
It frustrates me that else if is legal (R2018b) %% if length(c) > 1 d(end + 1,1) = 1; else if length(c) == 1 %#ok<S...

2 månader ago | 2

Answered
Creating a growing list
Add Joey = cell(0); before the loops and replace Joey = {('Bi**h Changed'),r,c} by Joey(end+1:end+3) = {('Bi**h Changed'...

2 månader ago | 0

| accepted

Answered
What frustrates you about MATLAB? #2
It frustrates me that enumeration events methods properties are not reserved keywords (in R2018b). The statement meth...

2 månader ago | 0

Answered
how, using a for loop, can I create an array
how using a for loop V and A are overwritten for every iteration of the loop. Try this vec = [.25:.25:4]; len = length( vec ...

3 månader ago | 0

| accepted

Answered
How to repeat run
Put your script in a function and call it 50 times for jj = 1 : 50 [ Ergebnis2p, Ergebnis3p ] = good_name( ); % store...

3 månader ago | 0

| accepted

Load more