**Statistics**

RANK**24**

of 242 467

REPUTATION**6 848**

CONTRIBUTIONS

**52** Questions

**2 302** Answers

ANSWER ACCEPTANCE **
53.85%
**

VOTES RECEIVED**1 153**

RANK**2 251** of 16 990

REPUTATION**694**

AVERAGE RATING**4.90**

CONTRIBUTIONS**5** Files

DOWNLOADS **41**

ALL TIME DOWNLOADS**5064**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

how to delete repeated rows in a table?

Test this %% M = [518460 3.322; 518460 -12.984; 518520 3.798; 518520 -10.28; 518580 7.763; 518580 16.851; 518640 5.959; 522225...

ungefär 18 timmar ago | 0

how to find a float number

find( abs( y7 -(-0.3340) ) < tol ) You choose tol. See eps - Floating-point relative accuracy

5 dagar ago | 0

| accepted

Tiny discussion on good practices in object oriented programming (OOP) through a simple example

"[...]titles of decent books for non-programmers" AFAIK: There is no book on object oriented design and programming with Matlab...

5 dagar ago | 0

Question

Is the Abstract keyword needed to make a method abstract?

Is this correct Matlab syntax classdef MyClass methods outarg = my_method( this, inarg ); end end R2018b a...

7 dagar ago | 1 answer | 0

### 1

answerHow to speed up the while loop?

You didn't test the code before uploading! I modified the input lines z = 1; % input('Enter zeta, z = '); w = 1; % input('Ent...

12 dagar ago | 0

| accepted

Matrix dimensions must agree.

Because (jy12) is 400x400 and omega is 200x200

12 dagar ago | 0

I got stuck with a loop after the value gets to NaN

The values of xr and yr do not converge to a solution that you expect. xr goes to zero and yr goes to "infinity". >> Newton_Ra...

17 dagar ago | 1

| accepted

Why the ouput of disp input function become looping?

The expected output is repeated a zillion times, because yfit is a vector with a zillion elements >> whos yfit Name Si...

18 dagar ago | 0

| accepted

Split every matrix in cell and make it into different cell

One way %% M = ones(32,32,2,3); % Sample data (20000 replaced by 3) C = mat2cell( M, 32, 32, 2, ones(1,3) ); %% C = sque...

19 dagar ago | 0

| accepted

How to convert 32x32x2x20000 into 20000x1 cell array?

A mat2cell example %% M = ones(32,32,2,6); % Sample data (20000 replaced by 6) C = mat2cell( M, 32, 32, 2, ones(1,6) ); %...

19 dagar ago | 0

| accepted

Why is my function not working?

The function must be at the end of the m-file. It's a local file in a script. (Or you can have the script and the function in tw...

20 dagar ago | 0

I cannot access the comment pane of the MathWorks Blogs. Am I the only one?

Tech support has reproduced the issue and suggests two work arounds Incognito mode in Chrome Clearing cache or cookies "Remo...

24 dagar ago | 0

Solved

Finding sum of even numbers in a vector.

Find the sum of all the even numbers present in the input vector x. Examples: Input x = [1 2 3 4] Output y is 6 Input...

27 dagar ago

Do I use the "for loop" correct or efficiently?

Replace the loops by a(1:1800)=50; a(1801:3000)=90; a(3001:3500)=0; to match the figure

28 dagar ago | 0

| accepted

Specify nature/type of property

... or something like: classdef meals properties food (1,1) struct = struct( 'type',{'wheat'}, 'calories',{...

ungefär en månad ago | 0

How to understand a datenum date?

A serial date (number) represents time as the number of days (and fraction of days) from January 0, 0000. sdn = now % the fu...

ungefär en månad ago | 0

Question

I cannot access the comment pane of the MathWorks Blogs. Am I the only one?

Over the last week I've failed to access the comment pane of the MathWorks Blogs, but for a few short occasions. Does anybody el...

ungefär en månad ago | 1 answer | 0

### 1

answerStrings to variable names

First a little exercise %% results = readtable('raw_data.csv'); results(4,:) %% results.Properties.VariableNames{'Sigma'} =...

ungefär en månad ago | 1

How to call a class-specified overloaded version of a function without using an object instance as an argument

"I don't want to define 'sin' as a static method because then sin(myNum) will not automatically invoke the overloaded function" ...

ungefär en månad ago | 1

| accepted

Recursively reversing large vector efficiently

Five ways to flip a row vector. The last one, reversal_v3(), answers your question. Recursion is by two order of magnitude slowe...

ungefär en månad ago | 0

Accessing properties in a class

There is nothing special with the name obj, it's just a name. The assignments in the method, fun1, creates a structure (named o...

ungefär 2 månader ago | 0

Gang-of-Four Design Patterns in MATLAB

I'm not aware of any "full or partial MATLAB collection" and I've search for it more than once. Googling for "design patterns ...

2 månader ago | 1

How to relocate (left side) the legend in plot ?

Read the documentation on legend() and notice legend(___,'Location',lcn)

2 månader ago | 0

| accepted

Creating charts in Matlab

Yes, see the function, bar( ..., 'stacked' ). However, it lacks the 3D character of the bars.

2 månader ago | 1

| accepted

MATLAB Answers Wish-list #5 (and bug reports)

Background: I recently put some effort into answering How to store and reuse coefficients in a for loop. My answer together wi...

2 månader ago | 1

How to store and reuse coefficients in a for loop

Caveat: I don't fully understand your code and what I say might not be relevant to your real project. "% Can this double for lo...

2 månader ago | 1

| accepted

check ismember for each element individually

The function arrayfun() does the trick (i.e. hides the foor-loop) a=[ 1 2 3 3 5 6 6]; b=[1 2 3 5 6]; cac = arrayfun( @(ii) fi...

2 månader ago | 0

Is it possible to put multiple functions in one matlab file file?

"I currently have six seperate scripts [you mean functions?]" What differs between the six functions? The name of the nc-files ...

3 månader ago | 0

When constructing an instance of class, the constructor must preserve the class of the returned object.

I don't know C++. (For some reason you added the tag "C++".) I guess you are biased by some other language. You need to look cl...

3 månader ago | 0

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...

4 månader ago | 0

| accepted