I am trying several functions who include vectors as variable. The variable (x) is
x= [2.0:0.5:5.0;]
I like to define the following kinds of functions:
f(x) = (x .+ 0.07im)/2.3;
g(x) = (1/f(x)).^2
h(x) = g(x) .* (2 .- (1 .+ f(x)).^0.5 - (1 .- f(x)).^0.5)
In this case, the function h
becomes 7x7 squared matrix, which I do not wish.
One dimensional vector is preferable for me. If I append [1] at the last part of h(x)
statement, I can work it around somehow.
To be honest, I prefer keeping my codes as simple as possible.
Removing “a dot before asterisk” resulted in a matrix having only one element,
which turns also out to be useless. Any idea?