Community Profile

photo

Davide Masiello


Paul Scherrer Institut (PSI)

Last seen: Today|Active since 2017

Programming Languages:
MATLAB
Spoken Languages:
English, Italian
Professional Interests:
Fluid Dynamics, Chemical Kinetics, Chemical Engineering, Heat and Mass Transfer

Statistics

All
  • Knowledgeable Level 4
  • Thankful Level 2
  • Knowledgeable Level 3
  • Solver
  • First Answer
  • Thankful Level 1

View badges

Content Feed

View by

回答
how to unite two curves smoothly in matlab?
This should work clc, clear, clf Ku_eGR_IL_WG_S21 =xlsread('Ku_eGR_IL_WG.xlsx','H:H'); % A S21 magnitude frequency =xlsread...

5 hours ago | 0

回答
Cycle of operations on vector sections
The problem is myfun spits out two vectors of size 1 x step+1. You could assign this vectors to the rows of a new matrix (see a...

5 hours ago | 0

|accepted

回答
Find minimal possible term x by trying out various combinations of other terms for a known sum
This may be an approach a = 2; % Can be repeated 128 times max b = 3.5; ...

7 hours ago | 0

回答
can't understand this statement
Yes, it extracts the terms on column 3 and rows 1 and 2 of b. Example b = magic(5) b(1:2,3)

7 hours ago | 0

回答
Why two methods give different results, and which is correct?
Since you have an implicit ODE, the correct solution is given by ode15i. The problem with ode45 is in the initial guess used to...

3 days ago | 0

|accepted

回答
how do I solve a quadratic which contains a changing b value
这有帮助吗?清楚,clc v0 = 34.7;%初始化ial velocity in m/s. Restricted to a maximum of 125 km/h prompt = "what is the ang...

4 days ago | 0

回答
Can't use fsolve to solve system of equations (4 unknowns)
I would suggest you put everything in a loop where at each iteration you solve for a different values of phi2. Moreover, at eac...

6 days ago | 0

回答
Finding minimum output value for same inputs in a table
clear,clc % The following matrix has two rows which have same x-y-z but different % output (namely, first and last rows) ...

7 days ago | 0

回答
Difference of elements of vector and matrix
If the values of B are to be found strictly in the first row of A, then use this clear,clc A = [1, 2, 3, 4 ; 5, 6, 7, 8]; B...

11 days ago | 1

回答
How solve this problem in Matlab
Note that your code displays a lot of matrixes because you haven't placed a semicolon when defining V. You can fix it easily c...

11 days ago | 0

回答
Print a value on a plot
I'd recommend taking a look at this https://ch.mathworks.com/help/matlab/ref/text.html Make sure to use num2str to convert the...

12 days ago | 0

回答
how to add + - 1% Noise to a constant input Power in order to make the output signals look like real ? thank you very much
One example x = 1:1000; y = ones(size(x)); % Your signal n = diff(0.1*rand(2,size(x,2)),1); % Arti...

12 days ago | 0

|accepted

回答
if temperature 17 increase until 23, swich on,Q=15*10^6 and if temperature 23 decrease untill17 switch off, Q = 0 how can I plot the temperature with time when T(0)=20degree
You could try this clear,clc tf = 3; % Final time of integration T0 = 20; % Initial temperat...

12 days ago | 1

回答
How do you sum concatenated variables in a system of ODES with a For Loop?
This should do it for any N N = 3; [t,X] = ode45(@(t,C)model(t,C,N),[0,2],rand(1,N)); plot(t,X) legend('c1','c2','c3') fu...

17 days ago | 1

|accepted

回答
How to write my function output in various form?
Simply, your function should look like this function [out1,out2,out3,out4,out5,out6,out6] = yourFunction(input) ... ... ... ...

17 days ago | 0

回答
Need to find the distance on the x axis between my two peek points
clear,clc % This just recreates your type of data x = (0:0.01:2*pi)'; y1 = sin(x)-0.5*x; y2 = flip(y1)-0.25*x; y = [y1,...

17 days ago | 0

|accepted

回答
Reiterate a function from an initial value
clear,clc dThetaS = zeros(1,10000); dThetaS(2) = 2; dTheta = 1; dThetaD = 1; Ka = 1; idx = 2; while abs...

17 days ago | 0

|accepted

回答
How to attach multiple matrices to a single matrix?
The code below will keep repeating the values form each array 5 by 5, i.e. it won't use only the first 5 values of each array. ...

17 days ago | 0

|accepted

回答
How to reduce matrix size conditionally?
You could use the max function. See below % here I reproduce your type of matrix A = rand(194,1); A = [A,A,A,A,A]; A(logical...

18 days ago | 0

回答
Convert portion of matrix under the diagonal to column vector
A = [ 1 2 3 4 5; 2 1 2 3 4; 3 4 1 2 5; 4 3 2 1 2; 5 4 3 2 1]; A = tril(A,-1)'; A = A(:); A(A==0) = []; A = A'

19 days ago | 1

回答
Count of total pixels and dimensions(rows and columns) of a picture?
绿草yImage = imread('retina.jpg'); numberOfPixels = numel(grayImage) [rows,cols] = size(grayImage)

19 days ago | 0

|accepted

回答
fill area between two curves
I think the problem might be that your y-values are column vectors, and therefore you create a matrix when you concatenate them ...

19 days ago | 0

回答
How to ignore certain columns in a matrix when calculating a mean across all columns in a matrix?
See if this works new_S_or_z = S_or_z(:,(max(S_or_z,[],1)-min(S_or_z,[],1)) < 200); plot(new_S_or_z) mean(new_S_or_z,[],2)

19 days ago | 0

|accepted

回答
random assignment to 1s in a matrix
c = randi([0,1],69,10) % This replaces your biricinfaz, didn't want to copy that ;) c(logical(c)) = randi(1...

19 days ago | 1

回答
Write a function that takes a number to be guessed and a player number, and checks if the winning criteria is met.
It could be something like this numberGuess([3,7,12,9,17]) function numberGuess(input) if length(input) ~= 5 error('In...

19 days ago | 0

回答
how to plot this function
clear,clc x = -1:0.1:1; psi0 = (pi^-0.25)*exp(-x.^2/2); plot(x,psi0)

20 days ago | 0

|accepted

回答
I got two different graphs from my code like ODE89 and Eulers method. I need to compare the graphs in it.
clc clear all %% ODE89 A0=1; B0=3; P0=0; K=5*10^-5; Yb=1; Yp=0.15; tspan = [0 43200]; [x,Y] = ode89(@(t,Y) odef...

20 days ago | 1

|accepted

回答
Finding maximum value and returning variable name of the column
clear,clc A = [1;2;3;4]; B = [5;4;1;2]; C = [2;3;2;5]; T=table(A,B,C); [maxval,idx] = max(table2array(T),[],2); T.Prop...

20 days ago | 1

|accepted

回答
How to generate pattern randomly In MATLAB
This is another approach based on the comments under my previous answer. It tries to implement the request by @Med Future that:...

21天前| 0

回答
How to generate pattern randomly In MATLAB
clear,clc n = 16; % Number of levels L = randi(1000,n,1); % Level values x = 1:1000; y = ones(size(x)...

22 days ago | 0

Load more