0

I have three different arrays a, b, c. I want to plot them in Matlab where c in the z axis and a and b in the x and y axis.

I mean I have a formula f(a, b) which I want to plot against a and b.

Wolfie
  • 27,562
  • 7
  • 28
  • 55
applied_math
  • 109
  • 1

1 Answers1

0

Have you tried meshgrid?

[a, b] = meshgrid(minA:stepA:maxA, minB:stepB:maxB);
c = myFunction(a,b);
surf(a,b,c);

Where a and b are in the ranges (minA,maxA) and (minB,maxB), respectively.

Morc
  • 381
  • 2
  • 9