**Statistics**

RANK**159**

of 265.345

REPUTATION**649**

CONTRIBUTIONS

**13** Questions

**234** Answers

ANSWER ACCEPTANCE **
76.92%
**

VOTES RECEIVED**86**

RANK**8.264** of 18.131

REPUTATION**87**

AVERAGE RATING**4.80**

CONTRIBUTIONS**1** File

DOWNLOADS **5**

ALL TIME DOWNLOADS**630**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Convert german numbers from excel to matlab (change comma versus point)

You may try to use readtable to import your data. It reads excel files and has the option 'DecimalSeparator' that can be set to ...

6 dagen ago | 1

| accepted

Create multiple copies of one file in multiple directories with different names

Try this. Note: the file A.txt must be in the current folder % data N = 10; dirName = 'Folder'; fileName = 'A'; % loop ...

6 dagen ago | 0

| accepted

How to rotating a stl object

You shoud translate the points p before the rotation and then move them back If R is your rotation matrix and the center of rot...

15 dagen ago | 0

| accepted

Very tricky:Manipulation with complex array

Following @Paul suggestion % original vector X = [4, 1, 1, 3, 8, 12]; % reshape to have 2xN vector W = reshape(X,2,[]); ...

15 dagen ago | 0

| accepted

Minimal-code to get axes limits of log-log plots, but using gscatter

You can remove the negative part of the axis before setting the log scale set(gca,'XLim',[0 max(xlim)],'YLim',[0 max(ylim)]); ...

4 maanden ago | 0

How to plot Temperature vs Efficiency curve using For loop and Linspace?

I have commented your plots to avoid moltiple figures % numebr of temperatures nT = 100; % temperature vector T = linspace(2...

4 maanden ago | 1

| accepted

Question

Calculation of consistent initial conditions for ODE

(minor edit) Hi everyone, I have written wrapper functions calling MATLAB's ODE solvers. Specifically, my problems are DAEs wi...

4 maanden ago | 1 answer | 0

### 1

answerHow to find same unique in two different size arrays?

Use ismember % data x=[1 22 22 3 8 19]; y=[22 10 19 35]; % engine [iii,jjj] = ismember(y(:),x(:)); countCommon = su...

4 maanden ago | 0

| accepted

Having trouble using for loops to create a matrix

I reproduce the result of the picture, because the question is not clear. a = 25 ; b = 5 ; c = (2*a)/b - 1 ; % do not use mi...

4 maanden ago | 0

| accepted

How to plot a function

You may use fplot figure, hold on fplot(@(x)x.^-3,[1 1e5]) fplot(@(x)x.^-2.8,[1 1e5]) % use bi-logaritmic scale set(gca,'...

4 maanden ago | 0

Ax = 0 with 2 values of x known

The post is old but the question arises many times, so I post here my solution. It is a generalization of @Matt J solution. Sup...

5 maanden ago | 0

Looking for visualization method to present finite difference numerical solution in 2D

You may use the low-level patch function. Since I don't have your data, please find below a self-consistent example showing the ...

7 maanden ago | 0

smooth step function with rise time

My colleague Sofia have found a paper [1] where authors report the analytic approximation of the piece-wise linear step function...

11 maanden ago | 1

| accepted

Question

smooth step function with rise time

Hi everyone, I know this question is more related to math than Matlab, but I know there are many gurus out there who can easily...

12 maanden ago | 3 answers | 1

### 3

answersHow can I calculate the sum of the absolute error?

Please check the code below. clear all, close all % model F = @(c,x)c(1)+c(2)*x+c(3)*(x.^2-1); % data xk = [-2 -1 0 1 ...

ongeveer een jaar ago | 1

| accepted

Drawing a rotating circle on a sphere

The code should be self-explicative [X,Y,Z] = sphere; % figure figure, hold on axis equal, view([1 1 1]); % sphere wit...

ongeveer een jaar ago | 0

| accepted

Showing me wrong Matrix Size.

multiply without the 'dot' OO= N*kk;

ongeveer een jaar ago | 0

How can you solve a system of second order differential equation, which is not time, but length and radius dependent?

This is not an ODE but a PDE. you should have a look at pdepe

ongeveer een jaar ago | 2

| accepted

We have a column vector and a row vector both of same lengths. How to use sum function to get element wise sum of two vectors and final answer display in row vector

vect3 = vect1.'+vect2 If you want to be sure of the element by element sum, regardles the shape of the two vectors (row or colu...

ongeveer een jaar ago | 0

| accepted

How to randomly change element of matrix?

You can use linear indexing % your matrix A = rand(10,100); % create the folder mkdir('storage'); % loop for i = 1:100...

ongeveer een jaar ago | 2

How to create a series of circle by using a specific radius in cartesian?

Try something like this % anonymous function to plot a circle given the center coordinates and the % radius plotcircle = @(x,...

ongeveer een jaar ago | 0

| accepted

Converting Euler ODE to the MATLAB code

f is an anonymous function f = @(t,y)[-2*y(1)+y(2)+15*cos(t); 2*y(1)-y(2)]; note that your script is not correct, since t is t...

ongeveer een jaar ago | 1

| accepted

How to call a variable matrix from one script to another script

I am not sure I have understtod correctly your problem. I give it a try. I would add an extra layer using an anonymous function...

ongeveer een jaar ago | 1

| accepted

How to use ~= operator as constraint function?

You may have a look here or here

ongeveer een jaar ago | 0

How to compare two time signals with different amount of samples?

Use interp1 to resample your vector(s) in order to have the same length clear variables, close all % time vector t1 = 0:1/1...

ongeveer een jaar ago | 1

solve efficiently sparse large linear system of equations

I would let the backslash operator work on this matrix sol = L\f; Can you share the original matrix to make other attempts?

ongeveer een jaar ago | 0

how to use lsqnonlin to solve conditional equation

The following code should be self explainatory. In the opposite case, simply ask clear all, close all % some dummy params va...

ongeveer een jaar ago | 0

| accepted

how to ascribe two values to a parameter such that it will be time dependent

You can pass an extra parameter to RiceG1 function using an anonmymous function. In your driver function add % extra anonimous ...

ongeveer een jaar ago | 1

Can someone help me implement my Kuramoto Model with time delay please?

Your function requires additional parameters. One way to pass them is to use an anonymous function as extra layer % params N =...

ongeveer een jaar ago | 0

| accepted

Euler's method in matlab

Any ODE solver gives the unknown function(s) as result, not its derivative. So, yes, your results are x and y. Note that in you...

ongeveer een jaar ago | 0

| accepted