Community Profile

photo

per isakson


KTH

2 033 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
Matlab 2014 docking/tilling/organizing windows?

1 jour ago | 1

| accepted

Answered
"Undefined function or variable 'imsplit'."
Maybe Imsplit, Split image or matrix into subparts using simple syntax by Jurgen. (Created with R2008a) of the File Exchange ...

4 jours ago | 1

Answered
Why do I get an "Invalid value returned."-error when assigning a string property inside a loop using v18b?
The syntax of your properties definitions properties( SetAccess = protected ) test_str@string as vector; ...

5 jours ago | 0

Answered
Group and individual means
Try this YSA1 = Y(Sub==1&A==1); SubMean = mean (YSA1);

13 jours ago | 0

| accepted

Answered
is it a bug?
I call this a bug. My comments The old function, str2num(), uses eval() to do the conversion. "Eval is evil" or at least tric...

15 jours ago | 2

| accepted

Answered
Save data from while loop
Your script overwrites x,y,z for each iteration. You need to assign vectors of appropriate length to x,y,z , (preallocate) befor...

17 jours ago | 1

Answered
how do i set a threshold on the values of the indices in my matrices for my entire code?
Try this M(abs(M)<=1e-9) = 1e-9; where M is a matrix. And see Indexing with Logical Values

17 jours ago | 0

| accepted

Answered
Possible to regexp a file with a for loop using expressions from an array?
I'm not sure that I fully understand your question. However, try this script %%-section by section %% txt = fileread( 'cssm.tx...

17 jours ago | 0

Answered
Long loading time of a 60 MB matrix
"loading a 60MB matrix took an average of 100.3 seconds" >> tic, S=load('h:\m\cssm\110.mat'); toc Elapsed time is 25.627453 se...

20 jours ago | 1

| accepted

Answered
Help!!! how to search for some xx xx xx xx(hex) in a dat file very fast!!!
Your question is very vaque and leaves room for interpretation. I assume that dat-file is an ordinary text file. I cannot gues...

22 jours ago | 0

Answered
Convert String Array to Numeric matrix and string array
Try this %% data_events = [ "1" "60" "" "" "" "" "" "" "" "" "...

22 jours ago | 0

Answered
Could someone explain what the code means
Comments on your code fragment the end of the for-loop is not shown, thus it is not clear how the value of functione is used f...

22 jours ago | 0

Answered
how to run my conversion program using loops
Try this %% main_folder = 'c:\whatever\mainfolder'; sad = dir( fullfile( main_folder, '**', '*.wav' ); sad = reshape( sad, 1...

23 jours ago | 0

Answered
Year conversion on figure wrong
That's most likely because 42931.00 is an Excel date number, not a Matlab date number. See Dates And Times In Excel. and http...

23 jours ago | 0

Answered
How to Delete Arrays?
See clear Remove items from workspace, freeing up system memory and clearvars Clear variables from memory

23 jours ago | 0

Answered
Use of nargin and varargin
It's a bit of a challenge to make this program correct easy to maintain user friendly (I assume that you really need all...

25 jours ago | 1

| accepted

Answered
save figure as filename that I already have
Q1: I've learned the hard way not to mess with legend(). Thus, I pass this one. Q2: Here is a hint. Run this script on...

28 jours ago | 0

| accepted

Answered
How can i fix ' Unable to perform assignment because the left and right sides have a different number of elements.' in the loop functions ?
One thing is to make a code run without throwing errors, another is to make it produce the intended result. Replacing omega3 b...

29 jours ago | 0

Answered
Extracting consecutive digits using regexp
These two returns "123" %% cac = regexp('ITEM 123', '.+?(\d+)', 'tokens' ) %% cac = regexp('ITEM 123', '[^\d]+(\d+)', 'token...

29 jours ago | 0

| accepted

Answered
How do I extract a number from a string?
Try this %%-section by section %% cac = { 123, 'U 2'; 'Mod3', 789 }; % Sample data %% isx = cellfun( @(chr) isa(chr,'char'),...

29 jours ago | 0

| accepted

Answered
How to create a vector with "n" random elements chosen from two values stated like "bit1" and "bit0"?
Try Fs = 100; y = randi( [0,1], 1,Fs ); y(y==0) = -1;

environ un mois ago | 0

Answered
problem in loading .mat file (Error using load)
On Win10, R2018b I have downloaded your two files from Box successfully dragged the 'Util_Tgt0.7_SC7_dr0.07_20181111_test2_Fi...

environ un mois ago | 0

Answered
MatLAB gives NaN result on simple loop
"where the f2 is always not equal to f1" My steps set dbstop if naninf started your script execution halted at line 77, z3 =...

environ un mois ago | 0

Answered
if statement with sub cases
Try %% text = 'Time = 16:0:16 Height'; %% num = sscanf( text, 'Time = %d:%d:%d Height' ); time = [ 60*60, 60, 1 ] * num;...

environ un mois ago | 1

| accepted

Answered
Mismatch between file and format character vector but the CSV file contains only numerics?
dlmread() fails to read and convert quoted digits, e.g. "123","456","789". Neither does csvread(). See Comma-separated values....

environ un mois ago | 1

| accepted

Answered
Using Textscan on non-uniform data
An exercise with fscanf() %% ffs = "HS_full_18md_nam_outputs.txt"; fid = fopen( ffs, 'r' ); [~] = fgetl( fid ); num = fsca...

environ un mois ago | 1

| accepted

Answered
How can I use a specified order of strings to index from a cell array?
Run section by section %% deg_baseFileName = "Test1_female_44k_70dBA_babble7ch_1sp_20k_00dBA_48k"; %% deg_parts = strsplit(d...

environ un mois ago | 1

Answered
Loading Large .txt files
You didn't say how much physical memory is in your system. Matlab provides ways to handle large text files, Large Files and Bi...

environ un mois ago | 0

| accepted

Answered
serveral normrnd without a loop
What about this? >> cell2mat( arrayfun( @(m,l) normrnd( m, sig, [1,l] ), mu, len, 'uni',false ) ) ans = Columns 1 through ...

environ un mois ago | 0

| accepted

Answered
How can I run a matlab program N times using a different value of one of my variables
Assumptions: You have a script. Lets call it myScript. The first line of myScript is clear all Near the top of myScript the...

environ un mois ago | 0

| accepted

Load more