Info
This question is closed. Reopen it to edit or answer.
matrix dimensions must agree
1 view (last 30 days)
Show older comments
I am trying to calculate the max temperature after individual time periods incremented in 1seconds (t_actuation_sC_r) but it will not work, it only calculates the max temp if i make the time a single number. any ideas why it won't work?
the D is a data file on my computer don't think its necessary to put in
t_actuation_sC_r=linspace(1,150,150);
t_max_sC_r=D.T_atm+((0.5*D.I_r*D.w_max^2)/(2*D.c_avg*((pi*(D.ro_r_s)^2)*D.thick_sC_avg)*D.rho_C_avg*(1-exp(-(t_actuation_sC_r*(D.h_C_avg-((2*pi*D.ro_r_s^2)+(pi*2*D.ro_r_s*D.thick_sC_avg))))/(D.c_avg*(((pi*(D.ro_r_s)^2)*D.thick_sC_avg)*D.rho_C_avg))))))
2 Comments
Michael Haderlein
on 31 Mar 2015
Edited: Michael Haderlein
on 31 Mar 2015
This comment moved from the redundant question ( http://de.mathworks.com/matlabcentral/answers/195409-someone-please-help-submission-in-2-days-need-to-make-this-work-somehow ):
Based on the information you give, it's impossible to say. Please (1) post all the relevant code (please also format it as code with the button above the field in which you enter the question), (2) tell us what is not working (error message? Wrong value? ...?) and (3) tell us what is D (as D seems to be a struct, best you just enter "D" in the command window and give us the output).
Also, please don't post the same question twice.
Answers (1)
Torsten
on 31 Mar 2015
Multiplication, division and potentiation of arrays in your case is always componentwise - thus you will have to use .*, ./ and .^ instead of *, / and ^.
Best wishes
Torsten.
1 Comment
Michael Haderlein
on 31 Mar 2015
Yes, most likely the answer goes in this direction. However, if t_actuation_sC_r is the only array with more than one element, this won't be the error, at least not in the code snipped shown here. t_actuation_sC_r appears only once in the equation and is not powered, thus, * and / should work here. Until we don't know more, all we can do is guessing.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!