I am trying to do a very simple problem on MATLAB, but I do not know much about MATLAB so this is challenging. Here is the code:(adsbygoogle = window.adsbygoogle || []).push({});

What I would like to happen is produce a graph of h=1.005*y^(2/3) with coordinates of h from 0 to 5 in increments of 0.5 and coordinates of y from 0 to 300 in increments of 50. The error I get is:Code (Text):

y=0:50:300;

D=0.210; % D is the mean sediment diameter

w=14*D^(1.1); % w is the particle fall speed

A=0.067*w^(0.44); % A is the sediment parameter

h=A*y^(2/3); % h is the shoreline depth under water

plot (y,h);

??? Error using ==> mpower

Inputs must be a scalar and a square matrix.

Error in ==> beachprof at 5

h=A*y^(2/3); % h is the shoreline depth under water

What is going on here and how can I fix it?

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# MATLAB exponent problem

Loading...

Similar Threads - MATLAB exponent problem | Date |
---|---|

Python How can I run Python by getting values from Matlab | Mar 7, 2018 |

What is each step of this Matlab program doing? | Feb 21, 2018 |

C/++/# Help with MATLAB code? | Feb 9, 2018 |

Numerical Integration with variable limits MATLAB | Jan 15, 2018 |

Fortran for Computational Fluid Dynamics Problems | Jan 11, 2018 |

**Physics Forums - The Fusion of Science and Community**