WICHTIG: Der Betrieb von goMatlab.de wird privat finanziert fortgesetzt. - Mehr Infos...

Mein MATLAB Forum - goMatlab.de

Mein MATLAB Forum

 
Gast > Registrieren       Autologin?   

Partner:




Forum
      Option
[Erweitert]
  • Diese Seite per Mail weiterempfehlen
     


Gehe zu:  
Neues Thema eröffnen Neue Antwort erstellen

Pfeil vom textbox bis zum bestimmten Punkt auf dem Diagramm

 

Yurii
Forum-Anfänger

Forum-Anfänger


Beiträge: 13
Anmeldedatum: 04.04.20
Wohnort: Bochum
Version: ---
     Beitrag Verfasst am: 04.02.2021, 09:34     Titel: Pfeil vom textbox bis zum bestimmten Punkt auf dem Diagramm
  Antworten mit Zitat      
Hallo zusammen!

ich möchte vom textbox bis zum bestimmten Punkt auf dem Diagramm einen Pfeil, sieh Bild, mittels code aufzeichnen. Die Punkte auf dem Diagramm sind die Variablen.

wenn das hilft, kopiere ich code für Plot, welche ich verwende.

Code:
plot(LC_1(:,10),LC_1(:,4),'Color',"red"); % zuers x-Achse und dann y-Achse
xlabel('Mean displacement [mm]','FontWeight',"bold"); % Beschriftung von x-Achse
ylabel('Horizontal load [kN]','FontWeight',"bold"); % Beschriftung von y-Achse
axis_LC1 = gca; % variable für limit y-Achse
set(axis_LC1,"YLim",[-200,200]) % limit y-Achse

%Primäres Hauptgitter
%----------------------------
grid on;
ax = gca;
%c = ax.GridColor;
ax.GridColor = 'black';%Farbe des primären Hauptgitters
%----------------------------
% erste zwie Zahlen sind Koordinaten vom Text im Diagramm
%text(-29,70,Bearing_name,'FontWeight',"bold",'ButtonDownFcn','latex')% Name of bearing
dim_1 = [0.14 0.605 0.3 0.3]; % Position vom 'textbox' im Diagramm in [%]
h_annotation_1=annotation('textbox',dim_1,'String',Bearing_name);
h_annotation_1.BackgroundColor = 'white';
h_annotation_1.FitBoxToText = "on";
h_annotation_1.FontWeight = "bold";
%----------------------------
% Kräfte
dim_2 = [0.14 0 0.25 0.8]; % Position vom 'textbox' im Diagramm in [%]
str_2 = {"F_v = " + F_v + " kN"};
h_annotation_2=annotation('textbox',dim_2,'String',str_2);
h_annotation_2.BackgroundColor = 'white';
h_annotation_2.FitBoxToText = "on";
h_annotation_2.FontWeight = "bold";
%----------------------------
% Reibwert
dim_3 = [0.14 0 0.25 0.26]; % Position vom 'textbox' im Diagramm in [%]
str_3 = {"\mu_{stat} = " + mue_LC1_static + " %","\mu_{dyn} = " + mue_LC1_dynymic + " %"};
h_annotation_3=annotation('textbox',dim_3,'String',str_3);
h_annotation_3.BackgroundColor = 'white';
h_annotation_3.FitBoxToText = "on";
h_annotation_3.FontWeight = "bold";
%----------------------------

% Kräfte
dim_4 = [0.65 0 0.25 0.26]; % Position vom 'textbox' im Diagramm in [%]
str_4 = {"F_{h.max} = " + maximum_Fh_LC1 + " kN"};
h_annotation_2=annotation('textbox',dim_4,'String',str_4);
h_annotation_2.BackgroundColor = 'white';
h_annotation_2.FitBoxToText = "on";
h_annotation_2.FontWeight = "bold";
%----------------------------

% Kräfte
dim_5 = [0.38 0 0.25 0.26]; % Position vom 'textbox' im Diagramm in [%]
str_5 = {"F_{h.dyn} = " + dyn_Fh_LC1 + " kN"};
h_annotation_2=annotation('textbox',dim_5,'String',str_5);
h_annotation_2.BackgroundColor = 'white';
h_annotation_2.FitBoxToText = "on";
h_annotation_2.FontWeight = "bold";
%----------------------------


Diagramm.jpg
 Beschreibung:

Download
 Dateiname:  Diagramm.jpg
 Dateigröße:  67.4 KB
 Heruntergeladen:  119 mal
Private Nachricht senden Benutzer-Profile anzeigen


Harald
Forum-Meister

Forum-Meister


Beiträge: 24.432
Anmeldedatum: 26.03.09
Wohnort: Nähe München
Version: ab 2017b
     Beitrag Verfasst am: 07.02.2021, 18:22     Titel:
  Antworten mit Zitat      
Hallo,

im Bild sind ja schon Pfeile. Wie hast du diese erstellst und was stört dich daran?

Zwei Möglichkeiten:
https://de.mathworks.com/matlabcent.....n-2-data-points-in-a-plot
https://de.mathworks.com/matlabcent.....-end-of-it-in-2-d-and-3-d

Grüße,
Harald
_________________

1.) Ask MATLAB Documentation
2.) Search gomatlab.de, google.de or MATLAB Answers
3.) Ask Technical Support of MathWorks
4.) Go mad, your problem is unsolvable ;)
Private Nachricht senden Benutzer-Profile anzeigen
 
Neues Thema eröffnen Neue Antwort erstellen



Einstellungen und Berechtigungen
Beiträge der letzten Zeit anzeigen:

Du kannst Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.
Du kannst Dateien in diesem Forum posten
Du kannst Dateien in diesem Forum herunterladen
.





 Impressum  | Nutzungsbedingungen  | Datenschutz | FAQ | goMatlab RSS Button RSS

Hosted by:


Copyright © 2007 - 2024 goMatlab.de | Dies ist keine offizielle Website der Firma The Mathworks

MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.