Community Profile

photo

per isakson


Last seen: Today

KTH

2,446 2010 年以降の合計貢献数

連絡する

per isakson's バッジ

  • 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

すべて表示

貢献した分野
表示方法

回答済み
How do I make this a function?
Something like this. With Matlab it's common practise to use double for all numerical variables. (Matlab has "integer in floatin...

16日 前 | 0

| 採用済み

回答済み
Create table from structure - alignment
I've modified the format specifier. %% mom.a = 1; mom.b = 2; mom.veryLongName = 3; header = {'Moment'; 'Value'}; fnames = ...

21日 前 | 0

回答済み
How to replace a number in a row vector with NaN in certain condition
abs(x(6)-x(8)) is equal to 10. Accourding to x_new, x(8) should be replaced by NaN. Thus I have use ">=". %% vec = [15 13 9 ...

24日 前 | 1

| 採用済み

回答済み
Getting Windows to open a file type using a MATLAB application
An alternative that doesn't require the Matlab compiler (but requires a Matlab license to run): Create a bat-file, e.g. read_xl...

25日 前 | 0

回答済み
How can I read a '.dat' file on MATLAB?
google says: "A file with the . dat file extension is a generic data file that stores specific information relating to the progr...

27日 前 | 0

回答済み
How to quickly find the indecies of elements in an array?
A = [1 9 2 8 3 7 4 6 5]; B = [5 6 7]; [~,ix] = ismember( B, A )

約1ヶ月 前 | 0

| 採用済み

回答済み
creating a character array in which each element takes multiple characters put together
The RHS of the two assignments in the for-loop are they correct? Don't show data as images. Seven lines can be included as cod...

約1ヶ月 前 | 0

回答済み
Why is command window printing out all the code?
There is a function called echo(), which I've never used. Have you run echo on by mistake? I reproduced the behavior you see ...

約1ヶ月 前 | 0

回答済み
Extracting data using regular expression
"all the columns [...] named "Physics", "Time", "dt", "Progress", "Nonlinear Iteration" "Linear Iterations"...."Nodes After Adap...

約1ヶ月 前 | 1

| 採用済み

回答済み
Load .dat files from subfolders with different names
Yes to both questions. With help of the code snippets below I guess you can put together a script. sad = dir( fullfile('Folder...

約1ヶ月 前 | 0

回答済み
Index exceeds the number of array elements (1).
Here are some links on debugging in Matlab Debug a MATLAB Program Debugging in MATLAB Debugging session Debugging Approaches...

約1ヶ月 前 | 0

回答済み
Specific values in an Array
R=[]; for i=1:1:5 for y=5:1:10 eq1=i*y; %% To save the values: R=[R; i y eq1]; end end a...

約1ヶ月 前 | 1

回答済み
Auto fetch input files to process from a specified folder
"I have a lot of data files that I would like to process through my code [...] each file from a specified folder one at a time" ...

約1ヶ月 前 | 0

| 採用済み

回答済み
Plotting a limited number of elements
"plot the first 5" An if-statement should do that. Replace plot(jvals(i,:), vetor_momentoj(i,:), '-o'), hold all by if i <= ...

約1ヶ月 前 | 1

| 採用済み

回答済み
How to modify a function handle?
That's simpler than you thought %% f1 = @(y) y; f2 = @(y) f1(y)*2; %% f2(5)

約1ヶ月 前 | 0

| 採用済み

回答済み
Storing variables in a for loop within another
"store the variable "vetor_momentoj" [...] in terms of the indexes i and j." Something like this? I replaced the calculation of...

約1ヶ月 前 | 0

| 採用済み

回答済み
Calculate with initial value
There is nothing that terminates the execution of the loop when convergence is reached. Thus, the while-loop will run until the ...

約1ヶ月 前 | 1

| 採用済み

回答済み
How to save data from a file with text and numbers?
"load this file and save lines starting from 'Step' to 'ID Type' to another file" Including the "ID Type" block - or not ? Thi...

約1ヶ月 前 | 0

| 採用済み

回答済み
what's wrong with this "IF" in the code below?
Cannot tell based on the info of your question. Show full error message. Set Pause on Errors Run the code. Execution will h...

約1ヶ月 前 | 1

回答済み
how to delete data with special value in an array?
"to delete the value" Do you mean remove? If so, try this script which uses logical indexing %% vec = 1+2*randn( 1, 800 ); %...

約1ヶ月 前 | 0

| 採用済み

回答済み
conversion of date from yyyymmddHHMMSS format to yymmddHHMMSS format.
vec = datevec( '2020,07,23,00,00,00', 'yyyy,mm,dd,HH,MM,SS' ); datestr( vec, 'yymmddHHMMSS' ) or did you mean datestr( vec, '...

約1ヶ月 前 | 0

回答済み
I am getting "Too few input arguments." error. How can i solve it?
See Not enough input arguments. And see narginchk - Validate number of input arguments.

約1ヶ月 前 | 0

回答済み
Trying to see if a variable is an integer or not
Try this %% x=2.5; answer = ( x == floor(x) )

約1ヶ月 前 | 0

| 採用済み

回答済み
Not enough input arguments.
You need to call the function, Lorenz, with two input arguments: t and x. E.g. %% x = (1:6); t = nan; xprime = Lorenz( t, x...

約1ヶ月 前 | 0

| 採用済み

回答済み
Help indexing: How to index at the interfaces of cells and not the cells
Index in position 2 exceeds array bounds U(:,j+2) is most likely the problem. I assume that the size of U is NEQxN. The max...

約2ヶ月 前 | 1

| 採用済み

回答済み
Problems in reading large matrix with large empty cells
This script reads your sample file %% opts = fixedWidthImportOptions('NumVariables',36,'DataLines',4,... 'VariableNames',{'IN...

約2ヶ月 前 | 0

| 採用済み

回答済み
out of memory error for large data
See How to export complex-valued matrix to HDF file

約2ヶ月 前 | 0

回答済み
Error: Not enough input arguments
Accourding to the definition function [ U_RK ] = RK4( U_T, Res, dx, dt, k, N ) requires six input values. Your call of the fun...

約2ヶ月 前 | 0

| 採用済み

回答済み
Best Matlab Editor replacement?
I have not always been loyal to the Matlab editor (ME) Long time ago I used the full version of the ED editor that comes (or di...

約2ヶ月 前 | 0

| 採用済み

回答済み
Getting error while deleting every row of the matrix M that contains the variable x
The trick is to iterate in reverse order, i.e a:-1:1 instead of 1:a. Try this %% M = magic(5); x = 13; N = Delete_var(x,M) ...

約2ヶ月 前 | 0

| 採用済み

Load more