Community Profile

photo

JongMyung


Last seen: 11 månader ago Active since 2023

Followers: 0   Following: 0

Statistics

  • Thankful Level 2

View badges

Feeds

View by

Question


I wanna implement this function, but it says there is an syntax error..
function y=myfunc(x) y=(x<0).*(2*exp(x)+(0<=x&x<1).*2+(1<=x&x<3).*(x^2-4*x+5)+(3<=x).*(1+cos(x-3)); endfunction

11 månader ago | 1 answer | 0

1

answer

Question


I want to draw a mesh surface. But when I use that code to draw it, YZ line is disappeared...
x=[1 2 3]; y=[1 2 3 4]; [X,Y]=meshgrid(x,y); Z=Y; plot3(X,Y,Z)

11 månader ago | 1 answer | 0

1

answer