Community Profile

# per isakson

### KTH

2.180 total contributions since 2010

#### per isakson's Badges

View all

Contributions in
View by

This script %% ffs = 'test.bin'; X = 1+2i; %% write codes fid = fopen(ffs,'w','ieee-be'); tmpdatR = real((X)); tmpdatI ...

alrededor de 6 horas ago | 0

How to know which toolboxes i am implementing
See matlab.codetools.requiredFilesAndProducts and How to list all function dependencies in v2016

2 días ago | 0

How to plot a 3 dimensional array
See 2-D and 3-D Plots

2 días ago | 0

why does matlab tell me that the "chop" command doesn't exist?
Make sure that you have the Control System Toolbox. chop() is a function in that toolbox. >> product_info = ver('control') pro...

3 días ago | 1

| accepted

How can I sum the elements in a vector row without using the sum function or any form of loops?
This is one way >> vec = (1:12); >> vec*ones(12,1) % replace '12' by length(vec) ans = 78 and check if that's the corre...

6 días ago | 2

How to extract specific rows & columns from a text file
See Read formatted data from text file or string and try fileID = fopen(filename); net_names = textscan( fileID, '%s%*f%*f%f...

6 días ago | 1

| accepted

Same Rows between two matrix
See setdiff, Set difference of two arrays and try >> setdiff( A, B, 'rows' ) ans = 0×2 empty double matrix >> setdiff( ...

7 días ago | 0

Getting a j x k Matrix from j and k-dimensional Vectors Without a For Loop?
See Matrix multiplication >> J*K' ans = 4 5 8 10 12 15

8 días ago | 0

| accepted

set class property only once
Here is an minimal working example of the design, which I think OP tried to implement. That is, use the fact that "MATLAB® evalu...

10 días ago | 0

Save a non scalar struct
The variable ss isn't saved between the calls of fun(). For the struct saved, only ss(4).bv is defined. That's the way Matlab w...

27 días ago | 0

Subscripted assignment dimension mismatch
See for loop to repeat specified number of times and note especially, "[...]Avoid assigning a value to the index variable within...

27 días ago | 0

| accepted

column to multiple row conversion
Try col = rand(366,1); % sample data mat = col2mat( col, 2020 ); and col = rand(365,1); % sample data mat = col2mat( col )...

28 días ago | 0

| accepted

How to Read and plot CSV file and delete infinity values from CSV file
Matlab provide many ways to read your csv-files. Here are two variants based on textscan, Read formatted data from text file or...

alrededor de 1 mes ago | 0

size of matrices in a struct
"add all the sizes of matrices" , but your code adds the heights (i.e. the number of rows). What exactly do you mean by "all si...

alrededor de 1 mes ago | 1

| accepted

how to replace all elements with zeros after "ONE" (number) in every column of matrix???
Try this >> m = randi([0,1],[6,8]) m = 0 0 0 1 0 0 0 0 0 1 1 1 1 1...

alrededor de 2 meses ago | 0

| accepted

Toolstrip behavior and Editor tabs
I don't know what the documentation says, but I guess it doesn't describe in any detail how the toolstrip shall behave. Yes, wi...

alrededor de 2 meses ago | 1

| accepted

When are search terms highlighted in the online documentation?
Tech support answers: "[...] the development team [...] confirm that this is not currently possible. [...] The developers will c...

alrededor de 2 meses ago | 0

How to optimize write operation to disk for faster execution?
Replace for i=1:length(data_hex_out) fprintf(h_file_out,'%s',data_hex_out(i,:)); end by fprintf( h_file_out, '%s', perm...

alrededor de 2 meses ago | 0

| accepted

What can I do with a web browser handle?
Undocumented Matlab and this book might be the best sources of information on the use of Java in Matlab(, besides the Matlab doc...

alrededor de 2 meses ago | 1

Can I save multiple seperate functions to one .m file?
IMO: The best solutions is a class with statics methods. >> lib.div( 8, 2 ) ans = 4 >> lib.mult( 8, 2 ) ans = 16 ...

2 meses ago | 0

Problems with averages and storing values
I like to present a different approach, which includes divide the projects into steps use Code Sections use functions use de...

2 meses ago | 0

Enumeration of classes in inheritance
I might neither fully have understood your code nor the title of the question. Nevertheless, I think this is a better approach. ...

2 meses ago | 0

| accepted

Question

When are search terms highlighted in the online documentation?
Background I use R2018b. I've created an online documentation for a toolbox. HTML help files. I written m-files and used pub...

2 meses ago | 1 answer | 2

### 1

how to read complex file data to matrix
Following Walter's advise %% chr = fileread('a.txt'); %% chr = strrep( chr, ' + ', '+' ); chr = strrep( chr, ' - ', '-' ); ...

2 meses ago | 0

| accepted

How do I find all entries in an object array with a certain property
Another approach >> cc = ClassC( 12 ); >> [cc.a] ans = 17 17 17 17 17 17 17 17 17 17 17 ...

3 meses ago | 0

How can I initialize nested handle class with independent values
"My question is, if i want to use handle class 'a'(2nd way), can i have a faster way to initialize 'a' and have independent b.a ...

3 meses ago | 1

| accepted

Error:" Output argument "y" (and maybe others) not assigned during call to"
I found this on if-elseif-else in the documentation of R14. Nonscalar Expressions If the evaluated expression yields a nonsc...

3 meses ago | 0

How to display two things on one line?
See Append Text to Strings before you try my code. >> "abc"+"def" ans = "abcdef" >> and your example >> x = 17; ...

3 meses ago | 0

Why doesn't my matrix appear without missing columns
The problem exists in R2018b,Win10

3 meses ago | 2

| accepted