Behaviour of an expression

  • Thread starter Akibarika
  • Start date
  • Tags
    Expression
In summary, an expression in science is a mathematical or chemical equation that represents a relationship between variables or quantities. Its behaviour greatly impacts scientific research by providing a framework for understanding and analyzing data. This behaviour can be influenced by factors such as variable values, mathematical operations, and evaluating conditions. Scientists can manipulate the expression to understand its behaviour better. It is crucial to understand expression behaviour in science as it allows for accurate representation, analysis, and prediction of complex phenomena, leading to advancements in knowledge and technology.
  • #1
Akibarika
9
0
I have an expression with piecewise functions. the code looks like:

Code:
function a()
  %some constants here

    f = 0:0.001:20;
    r1 = 0.05;
    p = something-f.*(something/something);
    for i=1:100
        r1= R(p);
    end
    for i=1:100
        r1 = R(P);
        y1(k,:) = r1;
    end
    y1=sort(y1)
    plot(f,y1,'k.','MarkerSize',1)
    xlabel('f')
    ylabel('r1');
    set(gca,'xlim',[0 20]);

    %piecewise functions here
    function r = R(P)
        r = NaN(size(P));
        r(P<=0) = sqrt((somthing)*(1-P(P<=0)/something).^-2);
        r(P>0) = sqrt((somthing)-(somthing)*(1-P(P>0)/somthing).^-5);
     end

end

My friend said the behaviour will be like the logistic map. but after printing, I found it just looks like a curve.

Did I make any mistakes in the code? Please help me

Kind Regards
 
Physics news on Phys.org
  • #2
It looks like your code is correct, but you did not specify what the function 'R' is supposed to do. As it is written now, it will just return a sorted array of NaN values, which will not produce an interesting plot. You need to define what this function does in order to get the desired behavior.
 

1. What is an expression in science?

An expression in science refers to a mathematical or chemical equation that represents a relationship between different variables or quantities. It is used to describe a phenomenon or process and can be used to make predictions or draw conclusions.

2. How does the behaviour of an expression affect scientific research?

The behaviour of an expression can greatly impact scientific research by providing a framework for understanding and analyzing data. It allows scientists to make predictions and test hypotheses, leading to a better understanding of the natural world.

3. What factors can influence the behaviour of an expression?

The behaviour of an expression can be influenced by a variety of factors, such as the values of the variables involved, the type of mathematical operation being performed, and the conditions under which the expression is being evaluated.

4. How can scientists manipulate the behaviour of an expression?

Scientists can manipulate the behaviour of an expression by changing the values of the variables, using different mathematical operations, or altering the conditions under which the expression is evaluated. They can also simplify or transform the expression to better understand its behaviour.

5. Why is it important to understand the behaviour of an expression in science?

Understanding the behaviour of an expression is crucial in science because it allows scientists to accurately represent and analyze complex phenomena. It also helps in making predictions and drawing conclusions, which are essential for advancing scientific knowledge and developing new technologies.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
14
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
508
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
869
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
565
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
959
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
18
Views
3K
Back
Top