Plotting With Arrays on Surf Function

3 vues (au cours des 30 derniers jours)
fraser watts
fraser watts le 30 Avr 2022
calculating the array correctly, yet when recalling it for displying on surf plot its just a flat surface

Réponse acceptée

Image Analyst
Image Analyst le 30 Avr 2022
How did you paste that code in there? I can't copy it. You didn't paste an image did you? We can't run an image. Post your code as code, or else attach it with the paperclip icon.
What is "laptime"? It doesn't change inside the loop so it's not surprising your array is all the same value.
Anyway, plot is a function. Do not use it as a variable name.
  5 commentaires
fraser watts
fraser watts le 30 Avr 2022
just realised it wont work need to change original code to then refernce laptime as an array into this new section, appriciate the repsonses though
Image Analyst
Image Analyst le 1 Mai 2022
Modifié(e) : Image Analyst le 1 Mai 2022
@fraser watts, if you have Laptime defined in advance somehow you can perhaps do
myPlot(k,j) = Laptime(k, j);

Connectez-vous pour commenter.

Plus de réponses (1)

Walter Roberson
Walter Roberson le 30 Avr 2022
Every iteration you are storing the exact same value Laptime, which never changes.
  1 commentaire
fraser watts
fraser watts le 30 Avr 2022
so how would i change

Connectez-vous pour commenter.

Tags

Produits


Version

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by