Plotting with values stored in Struct problem

조회 수: 1 (최근 30일)
Lawson Hoover
Lawson Hoover 2012년 12월 2일
I am trying to graph points saved in a structure. I get the values in different functions and save them to the structure. When I run the entire program, when it gets to the output function to plot everything I get the error:
_Undefined function 'beam_deflection_output' for input arguments of type 'struct'.
Error in Beam_Deflection (line 81) beam_deflection_output(Beam);_
Here is the Code for the output function:
function [] = beam_deflection_ouput(Beam)
%UNTITLED7 Summary of this function goes here
% Detailed explanation goes here
% Plotting the Info
astr=['Deflection of a ',Beam.Material,', ', Beam.Type,' with a ',Beam.Load,' Load and ',Beam.Support,' Support'];
bstr=['Beam Displacement (',Beam.Magnitude,'N)'];
plot(Beam.x,Beam.y1)
set(plot(Beam.x,Beam.y1),'LineWidth',3);
set(gca,'XTick',0:5:Beam.Length)
grid on
title(astr,'fontsize',9,'fontweight','bold');
xlabel('Beam Length');
ylabel(bstr);
set(gca,'YLim',[-150 150]);
set(gca,'XLim',[0 Beam.Length]);

채택된 답변

Walter Roberson
Walter Roberson 2012년 12월 2일
You defined function beam_deflection_ouput without a "t" after the "ou". "ouput" instead of "output"
  댓글 수: 1
Lawson Hoover
Lawson Hoover 2012년 12월 2일
Thank you. Its amazing how easy it is to miss that.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by