There exist functions A1,A2 and A3.
I want to proceed each functions for sigma.
it phrase as like this sigma Ai i=1 1 to 3
A1,A2 and A3 was have its own solution,so it same as constant. actually,i can solve via my note and hands,but i need to solve this problem through matlab.

댓글 수: 2

dpb
dpb 2016년 9월 30일
Are you implying sigma here as the summation symbol so that you're looking for sum(A1,A2,A3), maybe? Or, since you speak of each having a solution, is there some constraint involved?
We need more specifics on the functions and the solution desired; illustrating the hand solution perhaps would be the simplest way.
su hwan kim
su hwan kim 2016년 10월 3일
편집: su hwan kim 2016년 10월 3일

i want to Atot i understand and can approach to solve this problem but i cannot translate matlab...

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

 채택된 답변

dpb
dpb 2016년 10월 3일
편집: dpb 2016년 10월 3일

0 개 추천

Your textbook problem is specific to a given geometry; is the problem you wish to solve the same one exactly or are you looking to generate a more general toolset?
There are multiple ways to attack the problem, but you've got to start with the pieces--it's possible for a user to specify a functional form in text and build a function handle to it with str2func and it is then possible to build arrays of function handles and evaluate them over a set of inputs via strctfun. Those outputs can subsequently be operated upon with sum or whatever other operations are needed.
That's a fair amount of effort, but not tremendous with some digging through the doc's and reading the examples and experimenting on how to put the pieces together for your specific purpose, provided, of course, you're not trying to make a commercial-grade application here. :)
OTOH, to simply code up the specific example from the text, you can start out with
A=[a*t; b*t; (h-2*t)*tw]; % the individual areas vector
Atot=sum(A); % total area
Carry on similarly for the y components and just translate the steps into Matlab code.
You'd be well served to create this as a function file ("m-file"), no doubt, to which you can then pass the given constants either as a list or a structure or the like.

댓글 수: 3

su hwan kim
su hwan kim 2016년 10월 5일
thank you. i'll try to do it.
su hwan kim
su hwan kim 2016년 10월 5일
actually, i want to general approach to translating solving method at the matlab.
dpb
dpb 2016년 10월 5일
Well, that'll take sitting down and really working out a design of what you would expect a user interface to look like and how you would want to use the result...as noted earlier, that would likely become a fairly involved development project and probably need some "time in grade" getting more familiar with the basic syntax of Matlab in particular and (I'm guessing) coding in general.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

2016년 9월 30일

댓글:

dpb
2016년 10월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by