About 1,490,000 results
Open links in new tab
  1. How to plot a piecewise function on Matlab? - MathWorks

    Sep 12, 2021 · I need to plot the two piecewisely defined functions on the same graph. Please help me to write code. Thanks in advance.

  2. How to implement a piecewise function and then plot it on …

    Mar 10, 2015 · end plot(x, y, 'bo'); We spawn a new figure, then use hold on so that when we call plot multiple times, we append the results to the same figure. Next, for each set of cubic spline …

  3. piecewise - Conditionally defined expression or function - MATLAB

    pw = piecewise(cond1,val1,cond2,val2,...) returns the piecewise expression or function pw whose value is val1 when condition cond1 is true, is val2 when cond2 is true, and so on. If no …

  4. Piecewise function plot in Matlab - Mathematics Stack Exchange

    I can't seem to find out how to plot a piecewise function properly. I can get it by plotting two separate graphs and by using the hold on capability. You can always concatenate the data …

  5. How to plot a matlab function for different parameters using hold

    May 31, 2015 · I have a matlab function that contain some constant parameter, I want to draw that function, on say same figure, using hold on (probably) while changing the value of that …

  6. matlab - Plotting a piecewise continuous function - Stack …

    Nov 30, 2018 · figure; hold on plot(i1,f1,'b'); plot(i2,f2,'b'); plot(i3,f3,'b'); Or use the plot(X,Y,X1,Y1,...,Xn,Yn syntax: figure; plot(i1,f1,'b',i2,f2,'b',i3,f3,'b') Note that for the latter two …

  7. How to plot a piecewise function? - MATLAB Answers

    Dec 20, 2016 · The problem with your code is that when you apply an ‘if’ to an entire vector, as you have done with “if x<0”, it is not regarded as true by matlab unless all elements of that …

  8. How to graph a Piecewise function? - MATLAB Answers - MATLAB

    Mar 10, 2015 · I need to graph a piecewise function in terms of theta for a Homework assignment. I must first create a 100 element vector for the values of theta between 0 and 2*pi. After that I …

  9. Plotting a piecewise function using either for or while loops

    May 24, 2012 · and I need to make an M-script that evaluates for values of x starting at 0, and increasing in increments of 0.2 until x = 7, as well as showing a plot of the function against the …

  10. Mathematical Expressions and Functions Plots in MATLAB

    Plot the parametric curve x=cos (3t) and y=sin (2t). Plot the piecewise function. e x -3 < x < 0 cos (x) 0 < x < 3. Plot multiple lines using hold on. Specify the plotting intervals using the second …

  11. Some results have been removed
Refresh