Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
qc is determined in each z point . I need to find the average of qc in each layer . the layer thickness is dz
I need mathcad to find the average values of qc that correspond to dz values
Solved! Go to Solution.
Hi,
I am limited to Expresss so can only solve using subscripted vectors and matrices.
Enclosed is worksheet that gets the averages.
Cheers
Terry
Hi,
I am limited to Expresss so can only solve using subscripted vectors and matrices.
Enclosed is worksheet that gets the averages.
Cheers
Terry
thank you for your help
Why do you think I'm having this error although I just followed your sheet ?
Can you upload your worksheet.
Cheers
Terry
Hi,
If you have a full license for Prime the watermark will vanish.
Cheers
Terry
sure here you are you will find the calculation on page 9
Hi,
See enclosed it is now calculating averages.
Problem was z is previously designated as a nested matrix. Need to define z as a single vector.
Cheers
Terry
Hi Terry
I hope you are doing well . I know this very old question , I tried to use this function again , but I don't know why I'm getting errors. Can you help me to fix it > I couldn't upload the sheet > BTW it works in the other sheet ok.
The last five days the forum has problems with attachments. PTC admins are informed and according to Community Manager @AndrewK Khoros is working to fix the problem.
Its interesting that some people seem to have no problem uploading files, but others, like me and probably you, have problems doing so. I had success uploading a file in another thread after zipping it and uploading the zip archive.
I just tried here and experienced the same problem. Uploading the small mcdx file failed, but packing it in an archive is a possible workaround. It's annoying, but it works. I hope it won't be necessary to do this for much longer.
@AndrewK : Perhaps the problem and the workaround should be pointed out in “PTC Community Announcements”?
@YA_10963798 : According to your problem - you don't show what the error message is, but chances are its a "division by zero", right?
From your screenshot it looks like at least one value in your vector "ns" is zero (actually most elements in "ns" seem to be zero) and so its natural that you get an error if you use this vector in the denominator of the vectorized expression.
What did you expect from 0/0 (all elements but the first)?? What would you like to see as a result if the value in Sum is positive but the value in ns is zero (like 1/0)?
You could catch the error with "try...on error ..." and return a value of your choice (maybe 0, maybe NaN) in case the division fails. For example
And you sure will want to replace 12345 for something more meaningful 🙂
