Solving Unknowns in MATLAB: Approximation Scheme

  • Context: MATLAB 
  • Thread starter Thread starter ballzac
  • Start date Start date
  • Tags Tags
    Matlab Unknowns
Click For Summary

Discussion Overview

The discussion revolves around solving for an unknown variable in an approximation scheme using MATLAB. Participants explore methods to keep a pronumeral in calculations without assigning it a specific value, particularly in the context of iterative processes and boundary conditions.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant seeks a method in MATLAB to use a pronumeral without assigning a value, aiming to maintain it in the results over multiple iterations.
  • Another participant suggests the use of the symbolic toolbox in MATLAB as a potential solution, while also recommending reformulating the problem for methods like Newton-Raphson or fixed-point iteration.
  • A different participant describes a specific problem involving boundary conditions and recurrence relations, expressing uncertainty about how to implement the solution in MATLAB.
  • One participant reiterates the possibility of using the symbolic math toolbox and suggests normalizing variables during calculations, although they admit to not fully understanding the original problem.
  • A later reply indicates that the symbolic math toolbox may not be available at the university, prompting the participant to consider tracking the pronumeral through iterations instead.

Areas of Agreement / Disagreement

Participants express varying levels of understanding regarding the problem and potential solutions. There is no consensus on the best approach, and multiple methods are suggested without agreement on their effectiveness.

Contextual Notes

Participants mention limitations regarding the availability of the symbolic math toolbox at their university, which may affect their ability to implement certain solutions.

ballzac
Messages
100
Reaction score
0
Hi. I need to run through an approximation scheme, and one of the variables in the scheme is unknown, but I know what the final answer should be. I want to calculate the value of the unknown by figuring out what it must be for the approximation to equal the expected result after a significant number of iterations. Is there, in MATLAB, some way to use a pronumeral without assigning a value to it? i.e. so that the pronumeral remains in the result. e.g. we might run ten iterations of the program and have a^10 as a factor in the final result, then run it for 1000 iterations and have a^1000 in the final result. I have not been able to figure this out. Maybe there is a 'trick' that can be used for this kind of problem? Thanks in advance.
 
Physics news on Phys.org
ballzac said:
Hi. I need to run through an approximation scheme, and one of the variables in the scheme is unknown, but I know what the final answer should be. I want to calculate the value of the unknown by figuring out what it must be for the approximation to equal the expected result after a significant number of iterations. Is there, in MATLAB, some way to use a pronumeral without assigning a value to it? i.e. so that the pronumeral remains in the result. e.g. we might run ten iterations of the program and have a^10 as a factor in the final result, then run it for 1000 iterations and have a^1000 in the final result. I have not been able to figure this out. Maybe there is a 'trick' that can be used for this kind of problem? Thanks in advance.

Not that I'm aware of. Maybe with the symbolic toolbox? But regardless, you should probably be reformulating so you do some kind of Newton-Raphson or some other sort of fixed-point iteration?
http://en.wikipedia.org/wiki/Fixed_point_iteration
http://elm.eeng.dcu.ie/~ee317/Matlab_Examples/iter/tutinfo[1].htm
 
Last edited by a moderator:
I have a question that has one known value at each end (boundary conditions), and it is required to use one known value, and use that and the next value (which is unknown), and then follow the recurrence relation until the other known value is reached, and then use this value to calculate what the unknown value is. I hope that made sense. I am a little tired. So anyway, I'm sure there would be many ways to solve it, but that is specifically what we were told to do, and we were told to use MATLAB. Not sure how it was meant to be done. Oh well, I left it too late as it is due tomorrow, and I'm going to bed now, lol. Thanks for the info anyway. Cheers.
 
Yes, this would be possible with the symbolic math toolbox.

If you don't have that, maybe you can normalize everything to a (use a = 1 up until your final step), then re-scale? I don't think I fully understand your problem...

-Kerry
 
KLoux said:
Yes, this would be possible with the symbolic math toolbox.

If you don't have that, maybe you can normalize everything to a (use a = 1 up until your final step), then re-scale? I don't think I fully understand your problem...

-Kerry
I don't think I really do either :rolleyes: :redface:. But anyway, I think you're right that I will have to add it at the end. I'll just have to keep track of what happens to it at each iteration.

I gather we are not meant to use the symbolic math toolbox because AFAIK it is not installed at uni and has never been mentioned in the course. Thanks for the suggestion, I will see how it goes.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
8K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
8
Views
4K