Community Profile

photo

Petch Anuwutthinawin


Last seen: 2 months ago Active since 2021

Statistics

  • Thankful Level 2

View badges

Content Feed

View by

Question


How to reverse a Ax=b system of equation to find an A value from a x and b value
I have a system of equations that calculates for an i value called i4. This value is an x in the Ax =b system of equation forma...

2 months ago | 1 answer | 0

1

answer

Question


I need to solve a system of equations, without the syms command.
%I have a system of equations based off of Kirchoff law (e1-e6) that are %all simultaneously true. The code works to solve for ...

2 months ago | 1 answer | 0

1

answer

Question


Using the \ operator to fit a parabolic curve to a data set.
%for a certain file, the first column is the independent variable and %second is the dependent variable. C=xlsread('super.xlsx...

2 months ago | 2 answers | 0

2

answers

Question


I need to make a long code that already has loops loop.
%I need everything inside the loop (for=k1:L ) to loop L amount of times. %Each loop should create a new startingpos and do new...

2 months ago | 1 answer | 0

1

answer

Question


How to loop an already looping code, in order to find output convergent value.
%I have code which includes a for and while loop which I have to loop one %million times, to find a convergent output (probabil...

2 months ago | 1 answer | 0

1

answer

Question


Interpolating X axis values using a Y axis value and interp1 command.
% I need to interpolate this data using the interp1 command and find the X % value (time) when the Y value is 105. I do not kno...

2 months ago | 2 answers | 0

2

answers

Question


Is there a way to only read every third row of a .csv file?
I need my code to read every third row and every column of a .csv file and save it seperately. For example I need the third row,...

2 months ago | 1 answer | 0

1

answer

Question


How to use linear interpolation to resample taken data?
I am given a .csv file with three columns. The second column is dependent upon the first and third columns. The first column is ...

2 months ago | 1 answer | 0

1

answer

Question


How do I make the output of a loop the new input value, and loop it 15 times.
%SITUATION. %straight line of squares, 1-250. you start at random point. %move left or right (50 50 chance). %If on 1, only m...

3 months ago | 0 answers | 0

0

answers

Question


How to make a Monte carlo simulation for identifying prime numbers with a non-100% probability
%Scenario: %straight line of squares, 1-250. you start at random point. %move left or right (50 50 chance). %If on square 1, ...

3 months ago | 2 answers | 0

2

answers

Question


Monte Carlo simulation for probability of a multi part machine working
% each A part works 98% of the time. Each B works 91% of the time. % The machine has 12A and 7B parts. To function, at least 5B...

3 months ago | 3 answers | 0

3

answers

Question


Incompatible indices after trying to add multiple output rand functions.
%% I wrote this code as a monte carlo simulation in order to sum the randomly generated weights of 15 boxes. %% Each box is the...

3 months ago | 1 answer | 0

1

answer

Question


Monte Carlo simulation to find weight and statistics calculations
I need to make a monte carlo simulation for a problem of weight. The weight of one shipping pallete is 15 boxes, and each box ...

3 months ago | 2 answers | 0

2

answers

Question


Plotting to test probability convergence
I have written code that rolls a 12 sided dice and I need to plot a convergence graph for the value being 8 or above. I do not k...

3 months ago | 1 answer | 0

1

answer

Question


Making relative histogram for data, and a convergence diagram to see if enough trials have been run for monte carlo simulation.
I have written a monte carlo code for a double dice throw that calculates the probability of the throw sum being 8 or over 8. I ...

3 months ago | 1 answer | 0

1

answer

Question


Plotting xlsx file data using a for loop
I need to plot a raw data in a xlsx file using the fit command. I need to use a for loop in order to plot the data in the file. ...

3 months ago | 1 answer | 0

1

answer

Question


Renaming Fit rsquare value
I have made a fit for a set of data. It returns an rsquare value, which I have to rename to R1. %This is the code for the fit ...

3 months ago | 1 answer | 0

1

answer

Question


How to make a function output a matrix
I am trying to make a function that takes in multiple variables and outputs a matrix of values. The inputs are supposed to plug ...

3 months ago | 1 answer | 0

1

answer

Question


Using a for loop to print function values
I am trying to make a function that inputs Vs and outputs 0 if Vs<=0.6, and outputs VL-0.6 if Vs>0.6. I need this function to lo...

3 months ago | 1 answer | 0

1

answer

Question


Plotting for loop with two outputs
I need to plot a function with a two variable output using any method. The graph should plot an x range of 2-1000000. I have use...

3 months ago | 1 answer | 0

1

answer

Question


Creating for loop for a piecewise function
I have made a piecewise function using if statements that inputs Vs as a vector and outputs VL as a number. I need to loop this ...

3 months ago | 1 answer | 0

1

answer

Question


Sorting using a while loop without sort command
I need to make a funciton that given a vectoral input, outputs a vector of those elements sorted in ascending order. I dont know...

3 months ago | 0 answers | 0

0

answers

Question


Compound interest in a for loop
I need to create a loop to calculate the compound interest of a Roth IRA each year. The function has to input p(principal amount...

3 months ago | 1 answer | 0

1

answer

Question


How to make a sum series using a for loop
Given the power series of sin(x) I have to create a function that takes in x vector and N (number of terms in the sequence) and ...

3 months ago | 1 answer | 0

1

answer