(adsbygoogle = window.adsbygoogle || []).push({}); 1. The problem statement, all variables and given/known data

MATLAB

The funciton "rockdynamicstage" outputs a matrix 4 by x, where x is somthing around 300( varies).

The funciton "rockdynamicstage" is within the funciton handle "sim" with an input of gama0. (PayMass,Masstages,Massfrac,Thstage,IspStage,ChangeTstage) ar parameters that are set earlier in the code.

sim= @(gama0) rockdynamicstage(gama0,PayMass,Masstages,Massfrac,Thstage,IspStage,ChangeTstage);

2. Relevant equations

I need the "sim" to output the last element in the 4th row of the "rockdynamicstage". So that I get the last element in the 4th row in "rockdynamicstage" for a range of gama0s.

How would I output it.

3. The attempt at a solution

I tried doing

sim= @(gama0) rockdynamicstage(gama0,PayMass,Masstages,Massfrac,Thstage,IspStage,ChangeTstage)(4,end);

similar to when using a regular matrix

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: MATLAB function within function handle output

Have something to add?

Draft saved
Draft deleted

**Physics Forums | Science Articles, Homework Help, Discussion**