cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Drawing Plot error

YA_10963798
12-Amethyst

Drawing Plot error

I have  R which contains 27 matrics all of them have the same corresponnding depth ( ztips). I want to draw all of the matrics in one plot instead of having 27 plots. 

I tried the one Mr. Werner suggested before. However, it doesn't work here. I guess the mistake is that ztips and R are different types. 

The sheet is too long and I can't just substract R because it is the final result of all the above calculation. Sorry for this trouble 

Page 27 Prime 9

YA_10963798_0-1728893488235.png

 

9 REPLIES 9
LucMeekes
23-Emerald III
(To:YA_10963798)

Your R.s;cal;B is a vector of vectors. You cannot use that in a plot.

 

Success!
Luc

Werner_E
25-Diamond I
(To:YA_10963798)

Your worksheet contains a lot of errors as of not defined variables, so I can't test it myself.

But it may help if you replace "stack" by "augment" and omit the NaN

And of course you should plot R over Z and not R.s;cal

StuartBruff
23-Emerald III
(To:YA_10963798)

Is the worksheet you posted the latest version and the one that you are working with?  I couldn't get your worksheet to run properly without making a few modifications.  Primarily, you try to take last(ztips), implying ztips is a vector but you define it as a range variable (= ztips), so I used my vec function to change ztips into a vector - that seemed to get rid of most of the errors, but I don't know how many more I might have thrown up by doing so.

 

However, your prime(!) problems are that you are trying to plot Rs;cal;B against ztips

 

ztips is a range variable, so Mathcad expects to see it used in both axes.  Did you mean to use (NaNized) ztips with a section of ztips equal in length to each section of Rs;cal;B?  I note you only have 10 ztips values but 27 Rs;cal;B values.

 

Stuart

Although, you calculate Rs;cal;B you don't assign the NaNized vector version to Rs;cal;B, you assign it to R instead.

 

That still doesn't give the plot I think you want.

 

Stuart

StuartBruff
23-Emerald III
(To:StuartBruff)

Nor am I sure this is what you want.  It matches an R section against each ztips value, which effectively plots the range of forces for each depth (ie, it's a horizontal line).  It may be useful as a summary of some kind.

 

2024 10 14 A.png

 

Multiplying a vector by zero is a time-honoured Mathcad method for getting a zero-vector of a desired length without the hassle of worrying about exactly what length you need.  

 

Stuart

StuartBruff
23-Emerald III
(To:StuartBruff)

However, if it is the plot you want, then there is no need to plot the entire pressure vector for each depth.  You only need the min and max pressures, which simplifies the whole business.

 

2024 10 14 B.png

 

Stuart

Thank you. I think I should track the mistakes first then draw the plot. 

StuartBruff
23-Emerald III
(To:YA_10963798)

I look forward to your update, Yusra.

 

Stuart

Werner_E
25-Diamond I
(To:YA_10963798)

Had a second look at your sheet.

Could it be that you are looking for a plot like this?

Werner_E_1-1728923429674.png

I highlighted just 2 of the 27 traces. Column 16 stands out as being significantly different from the rest.

 

Prime 9 sheet attached

 

 

I think this will work , I may have done some calculation wrong this is why the results are strange . Thank you Werner

Announcements

Top Tags