whats the total number of ss in:
xs is a large matrix and xt is a transpose version of xs.
lami is a diagonal matrix and rhs is a vector.
how can i fix it? thank you in advance.
if you could post a bit more of the error message or a mwe that would be helpful.
to me the concerning thing is the type part of the error. that seems to imply you are passing in an array datatype instead of an actual array.
here is the complete error.
seems i have problem with the vector and arrays type.
this looks like rhs is a vector of matrices, not a matrix.
aside from that, please use triple backticks (```) for code blocks, not quotations. otherwise, some characters are swallowed (in your original code block, there are some * missing because they are used to toggle italics).
yes, how can i fix the issue about rhs?
that depends on what you want to do. i assume you want a vector of numbers instead of a vector of matrices? i don’t understand how you get a vector of matrices in the first place, i think readdlm always returns a matrix. how is the rhs.txt file formatted?
also, the stacktrace implies that you call \, not /, which is it?
yes, i want a vector of numbers, when i open the rhs, it is a one-column vector with numbers.
i do not understand why matrix format and vector format matters for rhs in this case.
and i thought b = rhs\mme and b = mee/rhs are same.
it would not matter whether rhs is a vector or a matrix if its elements were numbers. however, in this case, rhs is a vector that contains matrices.
ok, altough i do not how to solve the problem, i am pretty sure that rhs is a vector with numbers. and for calculating b, i should use b = mee/rhs.
unfortunately it is kind of difficult to help with so little information. could you paste a way to reproduce your arrays? maybe uploading a smaller version of them and/or how to create them. it will be easier to debug then.
you can take a look at this thread with advice on what kind of info would make it easier.
so it is working now? great.
when you transpose the vector rhs you get only one column and many rows, or viceversa, then the operation is not possible. if mme is a square matrix, its number of rows and columns do not change when transposing.
user
The total number of "s"s in that passage is one hundred and twenty-three.
assistant