zerguine_nafissa asked . 2021-06-17

how can i find the intersection point between the vertical lines and the curve (xmin,ymin) ?

Hi, i want to find the intersection point between the green vertical lines and the red curve (xmin,ymin) and display the point coordinates,
 
if there is another declaration to vertical line please tell me and thank you
this is my script :
 
clc,clear all
x=[900	899.5	899	898.5	898	897.5	897	896.5	896	895.5	895	894.5	894	893.5	893	892.5	892	891.5	891	890.5	890	889.5	889	888.5	888	887.5	887	886.5	886	885.5	885	884.5	884	883.5	883	882.5	882	881.5	881	880.5	880	879.5	879	878.5	878	877.5	877	876.5	876	875.5	875	874.5	874	873.5	873	872.5	872	871.5	871	870.5	870	869.5	869	868.5	868	867.5	867	866.5	866	865.5	865	864.5	864	863.5	863	862.5	862	861.5	861	860.5	860	859.5	859	858.5	858	857.5	857	856.5	856	855.5	855	854.5	854	853.5	853	852.5	852	851.5	851	850.5	850	849.5	849	848.5	848	847.5	847	846.5	846	845.5	845	844.5	844	843.5	843	842.5	842	841.5	841	840.5	840	839.5	839	838.5	838	837.5	837	836.5	836	835.5	835	834.5	834	833.5	833	832.5	832	831.5	831	830.5	830	829.5	829	828.5	828	827.5	827	826.5	826	825.5	825	824.5	824	823.5	823	822.5	822	821.5	821	820.5	820	819.5	819	818.5	818	817.5	817	816.5	816	815.5	815	814.5	814	813.5	813	812.5	812	811.5	811	810.5	810	809.5	809	808.5	808	807.5	807	806.5	806	805.5	805	804.5	804	803.5	803	802.5	802	801.5	801	800.5	800	799.5	799	798.5	798	797.5	797	796.5	796	795.5	795	794.5	794	793.5	793	792.5	792	791.5	791	790.5	790	789.5	789	788.5	788	787.5	787	786.5	786	785.5	785	784.5	784	783.5	783	782.5	782	781.5	781	780.5	780	779.5	779	778.5	778	777.5	777	776.5	776	775.5	775	774.5	774	773.5	773	772.5	772	771.5	771	770.5	770	769.5	769	768.5	768	767.5	767	766.5	766	765.5	765	764.5	764	763.5	763	762.5	762	761.5	761	760.5	760	759.5	759	758.5	758	757.5	757	756.5	756	755.5	755	754.5	754	753.5	753	752.5	752	751.5	751	750.5	750	749.5	749	748.5	748	747.5	747	746.5	746	745.5	745	744.5	744	743.5	743	742.5	742	741.5	741	740.5	740	739.5	739	738.5	738	737.5	737	736.5	736	735.5	735	734.5	734	733.5	733	732.5	732	731.5	731	730.5	730	729.5	729	728.5	728	727.5	727	726.5	726	725.5	725	724.5	724	723.5	723	722.5	722	721.5	721	720.5	720	719.5	719	718.5	718	717.5	717	716.5	716	715.5	715	714.5	714	713.5	713	712.5	712	711.5	711	710.5	710	709.5	709	708.5	708	707.5	707	706.5	706	705.5	705	704.5	704	703.5	703	702.5	702	701.5	701	700.5	700	699.5	699	698.5	698	697.5	697	696.5	696	695.5	695	694.5	694	693.5	693	692.5	692	691.5	691	690.5	690	689.5	689	688.5	688	687.5	687	686.5	686	685.5	685	684.5	684	683.5	683	682.5	682	681.5	681	680.5	680	679.5	679	678.5	678	677.5	677	676.5	676	675.5	675	674.5	674	673.5	673	672.5	672	671.5	671	670.5	670	669.5	669	668.5	668	667.5	667	666.5	666	665.5	665	664.5	664	663.5	663	662.5	662	661.5	661	660.5	660	659.5	659	658.5	658	657.5	657	656.5	656	655.5	655	654.5	654	653.5	653	652.5	652	651.5	651	650.5	650	649.5	649	648.5	648	647.5	647	646.5	646	645.5	645	644.5	644	643.5	643	642.5	642	641.5	641	640.5	640	639.5	639	638.5	638	637.5	637	636.5	636	635.5	635	634.5	634	633.5	633	632.5	632	631.5	631	630.5	630	629.5	629	628.5	628	627.5	627	626.5	626	625.5	625	624.5	624	623.5	623	622.5	622	621.5	621	620.5	620	619.5	619	618.5	618	617.5	617	616.5	616	615.5	615	614.5	614	613.5	613	612.5	612	611.5	611	610.5	610	609.5	609	608.5	608	607.5	607	606.5	606	605.5	605	604.5	604	603.5	603	602.5	602	601.5	601	600.5	600	599.5	599	598.5	598	597.5	597	596.5	596	595.5	595	594.5	594	593.5	593	592.5	592	591.5	591	590.5	590	589.5	589	588.5	588	587.5	587	586.5	586	585.5	585	584.5	584	583.5	583	582.5	582	581.5	581	580.5	580	579.5	579	578.5	578	577.5	577	576.5	576	575.5	575	574.5	574	573.5	573	572.5	572	571.5	571	570.5	570	569.5	569	568.5	568	567.5	567	566.5	566	565.5	565	564.5	564	563.5	563	562.5	562	561.5	561	560.5	560	559.5	559	558.5	558	557.5	557	556.5	556	555.5	555	554.5	554	553.5	553	552.5	552	551.5	551	550.5	550	549.5	549	548.5	548	547.5	547	546.5	546	545.5	545	544.5	544	543.5	543	542.5	542	541.5	541	540.5	540	539.5	539	538.5	538	537.5	537	536.5	536	535.5	535	534.5	534	533.5	533	532.5	532	531.5	531	530.5	530	529.5	529	528.5	528	527.5	527	526.5	526	525.5	525	524.5	524	523.5	523	522.5	522	521.5	521	520.5	520	519.5	519	518.5	518	517.5	517	516.5	516	515.5	515	514.5	514	513.5	513	512.5	512	511.5	511	510.5	510	509.5	509	508.5	508	507.5	507	506.5	506	505.5	505	504.5	504	503.5	503	502.5	502	501.5	501	500.5	500	499.5	499	498.5	498	497.5	497	496.5	496	495.5	495	494.5	494	493.5	493	492.5	492	491.5	491	490.5	490	489.5	489	488.5	488	487.5	487	486.5	486	485.5	485	484.5	484	483.5	483	482.5	482	481.5	481	480.5	480	479.5	479	478.5	478	477.5	477	476.5	476	475.5	475	474.5	474	473.5	473	472.5	472	471.5	471	470.5	470	469.5	469	468.5	468	467.5	467	466.5	466	465.5	465	464.5	464	463.5	463	462.5	462	461.5	461	460.5	460	459.5	459	458.5	458	457.5	457	456.5	456	455.5	455	454.5	454	453.5	453	452.5	452	451.5	451	450.5	450	449.5	449	448.5	448	447.5	447	446.5	446	445.5	445	444.5	444	443.5	443	442.5	442	441.5	441	440.5	440	439.5	439	438.5	438	437.5	437	436.5	436	435.5	435	434.5	434	433.5	433	432.5	432	431.5	431	430.5	430	429.5	429	428.5	428	427.5	427	426.5	426	425.5	425	424.5	424	423.5	423	422.5	422	421.5	421	420.5	420	419.5	419	418.5	418	417.5	417	416.5	416	415.5	415	414.5	414	413.5	413	412.5	412	411.5	411	410.5	410	409.5	409	408.5	408	407.5	407	406.5	406	405.5	405	404.5	404	403.5	403	402.5	402	401.5	401	400.5	400	399.5	399	398.5	398	397.5	397	396.5	396	395.5	395	394.5	394	393.5	393	392.5	392	391.5	391	390.5	390	389.5	389	388.5	388	387.5	387	386.5	386	385.5	385	384.5	384	383.5	383	382.5	382	381.5	381	380.5	380	379.5	379	378.5	378	377.5	377	376.5	376	375.5	375	374.5	374	373.5	373	372.5	372	371.5	371	370.5	370	369.5	369	368.5	368	367.5	367	366.5	366	365.5	365	364.5	364	363.5	363	362.5	362	361.5	361	360.5	360	359.5	359	358.5	358	357.5	357	356.5	356	355.5	355	354.5	354	353.5	353	352.5	352	351.5	351	350.5	350	349.5	349	348.5	348	347.5	347	346.5	346	345.5	345	344.5	344	343.5	343	342.5	342	341.5	341	340.5	340	339.5	339	338.5	338	337.5	337	336.5	336	335.5	335	334.5	334	333.5	333	332.5	332	331.5	331	330.5	330	329.5	329	328.5	328	327.5	327	326.5	326	325.5	325	324.5	324	323.5	323	322.5	322	321.5	321	320.5	320	319.5	319	318.5	318	317.5	317	316.5	316	315.5	315	314.5	314	313.5	313	312.5	312	311.5	311	310.5	310	309.5	309	308.5	308	307.5	307	306.5	306	305.5	305	304.5	304	303.5	303	302.5	302	301.5	301	300.5	300	299.5	299	298.5	298	297.5	297	296.5	296	295.5	295	294.5	294	293.5	293	292.5	292	291.5	291	290.5	290];
y=[81.111	81.076	81.041	81.017	80.985	80.96	80.942	80.91	80.866	80.841	80.832	80.805	80.767	80.734	80.718	80.686	80.654	80.626	80.599	80.573	80.553	80.541	80.529	80.495	80.458	80.443	80.426	80.4	80.382	80.356	80.318	80.29	80.281	80.254	80.242	80.228	80.214	80.181	80.152	80.127	80.113	80.092	80.075	80.055	80.037	80.008	79.99	79.97	79.95	79.936	79.918	79.915	79.901	79.883	79.865	79.846	79.83	79.811	79.792	79.773	79.761	79.766	79.752	79.732	79.721	79.691	79.676	79.672	79.669	79.657	79.636	79.627	79.616	79.599	79.579	79.567	79.569	79.566	79.547	79.532	79.529	79.517	79.517	79.505	79.499	79.492	79.488	79.491	79.494	79.483	79.463	79.454	79.448	79.453	79.436	79.438	79.447	79.439	79.428	79.427	79.433	79.438	79.438	79.43	79.419	79.422	79.421	79.425	79.427	79.415	79.421	79.433	79.424	79.421	79.421	79.424	79.434	79.445	79.444	79.434	79.439	79.441	79.451	79.46	79.459	79.456	79.463	79.48	79.503	79.511	79.52	79.526	79.524	79.535	79.54	79.54	79.546	79.575	79.599	79.608	79.622	79.637	79.634	79.64	79.648	79.659	79.679	79.689	79.709	79.717	79.737	79.758	79.776	79.782	79.796	79.814	79.824	79.842	79.865	79.883	79.897	79.921	79.944	79.958	79.976	79.993	80.017	80.039	80.06	80.072	80.101	80.112	80.133	80.162	80.182	80.222	80.239	80.266	80.28	80.3	80.323	80.347	80.38	80.409	80.426	80.452	80.469	80.506	80.536	80.556	80.574	80.606	80.632	80.666	80.702	80.728	80.754	80.78	80.811	80.837	80.866	80.895	80.928	80.963	81.002	81.027	81.041	81.078	81.108	81.136	81.16	81.191	81.227	81.261	81.302	81.333	81.371	81.392	81.426	81.459	81.499	81.526	81.554	81.587	81.624	81.656	81.7	81.726	81.755	81.797	81.842	81.874	81.909	81.96	81.995	82.021	82.041	82.074	82.118	82.169	82.201	82.227	82.25	82.288	82.331	82.369	82.399	82.436	82.474	82.515	82.544	82.587	82.628	82.663	82.686	82.727	82.758	82.791	82.836	82.875	82.906	82.939	82.967	83.011	83.061	83.089	83.122	83.17	83.202	83.24	83.269	83.293	83.33	83.376	83.411	83.451	83.489	83.516	83.539	83.573	83.612	83.644	83.673	83.71	83.753	83.782	83.809	83.838	83.875	83.892	83.911	83.957	83.991	84.024	84.055	84.075	84.102	84.142	84.166	84.194	84.223	84.259	84.276	84.3	84.336	84.363	84.386	84.41	84.442	84.467	84.485	84.502	84.52	84.549	84.59	84.615	84.633	84.648	84.673	84.694	84.712	84.734	84.766	84.78	84.792	84.81	84.83	84.85	84.87	84.879	84.896	84.908	84.917	84.931	84.946	84.961	84.978	84.999	84.996	85.01	85.027	85.044	85.056	85.059	85.05	85.068	85.073	85.083	85.082	85.089	85.085	85.091	85.094	85.108	85.103	85.1	85.106	85.106	85.099	85.108	85.106	85.099	85.089	85.086	85.091	85.085	85.076	85.066	85.062	85.06	85.053	85.041	85.025	85.018	85.007	84.989	84.979	84.97	84.952	84.943	84.918	84.908	84.905	84.888	84.86	84.845	84.827	84.793	84.777	84.758	84.732	84.717	84.69	84.662	84.642	84.612	84.58	84.552	84.52	84.497	84.482	84.433	84.397	84.362	84.334	84.311	84.285	84.244	84.203	84.175	84.148	84.099	84.061	84.02	83.994	83.953	83.913	83.861	83.829	83.792	83.75	83.71	83.679	83.632	83.586	83.542	83.499	83.444	83.408	83.365	83.328	83.274	83.222	83.168	83.127	83.084	83.04	82.985	82.933	82.888	82.836	82.784	82.729	82.677	82.63	82.576	82.524	82.46	82.414	82.36	82.303	82.253	82.204	82.134	82.074	82.022	81.967	81.917	81.859	81.798	81.746	81.694	81.632	81.571	81.519	81.468	81.409	81.349	81.291	81.229	81.168	81.111	81.06	81.002	80.939	80.884	80.831	80.774	80.718	80.66	80.594	80.533	80.475	80.419	80.365	80.309	80.257	80.2	80.144	80.088	80.03	79.973	79.926	79.875	79.816	79.753	79.7	79.653	79.592	79.526	79.482	79.427	79.381	79.332	79.28	79.218	79.177	79.134	79.091	79.047	79	78.954	78.903	78.861	78.812	78.768	78.722	78.687	78.644	78.583	78.543	78.516	78.476	78.437	78.397	78.356	78.322	78.281	78.238	78.195	78.148	78.104	78.061	78.028	77.991	77.959	77.935	77.907	77.877	77.861	77.829	77.799	77.779	77.741	77.71	77.683	77.652	77.631	77.613	77.585	77.565	77.547	77.526	77.509	77.475	77.448	77.423	77.416	77.413	77.402	77.385	77.376	77.359	77.346	77.336	77.32	77.31	77.312	77.306	77.292	77.291	77.289	77.286	77.283	77.281	77.292	77.283	77.277	77.274	77.291	77.304	77.303	77.298	77.292	77.292	77.304	77.326	77.332	77.338	77.355	77.364	77.376	77.385	77.404	77.414	77.428	77.443	77.457	77.474	77.489	77.51	77.538	77.559	77.587	77.603	77.617	77.642	77.666	77.693	77.722	77.744	77.765	77.793	77.814	77.835	77.863	77.901	77.924	77.956	77.98	78.006	78.034	78.064	78.105	78.137	78.168	78.211	78.243	78.273	78.307	78.337	78.369	78.403	78.438	78.476	78.504	78.552	78.588	78.615	78.653	78.696	78.719	78.762	78.794	78.82	78.852	78.882	78.923	78.968	78.997	79.027	79.058	79.093	79.131	79.158	79.193	79.225	79.254	79.286	79.315	79.332	79.36	79.398	79.427	79.451	79.488	79.511	79.546	79.567	79.589	79.615	79.639	79.65	79.666	79.686	79.703	79.721	79.75	79.784	79.799	79.808	79.819	79.822	79.833	79.849	79.86	79.868	79.891	79.897	79.912	79.918	79.914	79.915	79.917	79.918	79.935	79.93	79.915	79.911	79.904	79.891	79.891	79.877	79.869	79.859	79.845	79.822	79.811	79.802	79.781	79.756	79.737	79.721	79.697	79.671	79.645	79.613	79.587	79.563	79.535	79.502	79.468	79.439	79.404	79.363	79.325	79.279	79.257	79.198	79.129	79.055	79.01	78.972	78.923	78.868	78.81	78.76	78.705	78.656	78.612	78.563	78.507	78.446	78.374	78.319	78.267	78.209	78.141	78.083	78.021	77.968	77.899	77.848	77.771	77.706	77.637	77.576	77.51	77.443	77.365	77.301	77.233	77.156	77.082	77.022	76.947	76.886	76.825	76.763	76.683	76.607	76.544	76.477	76.416	76.337	76.267	76.192	76.126	76.055	75.983	75.919	75.855	75.794	75.724	75.662	75.595	75.527	75.463	75.4	75.341	75.278	75.214	75.153	75.098	75.034	74.979	74.932	74.871	74.808	74.753	74.706	74.654	74.61	74.564	74.52	74.466	74.43	74.385	74.344	74.3	74.253	74.222	74.184	74.152	74.124	74.094	74.073	74.036	74.004	73.969	73.941	73.932	73.914	73.892	73.863	73.844	73.828	73.812	73.781	73.758	73.746	73.74	73.734	73.731	73.728	73.72	73.696	73.696	73.683	73.694	73.688	73.682	73.673	73.682	73.696	73.691	73.693	73.699	73.696	73.694	73.702	73.715	73.715	73.722	73.726	73.735	73.741	73.752	73.763	73.783	73.786	73.79	73.796	73.804	73.815	73.822	73.834	73.847	73.859	73.879	73.894	73.894	73.905	73.918	73.921	73.917	73.926	73.937	73.938	73.938	73.944	73.949	73.94	73.943	73.949	73.943	73.946	73.943	73.941	73.934	73.926	73.911	73.883	73.873	73.862	73.854	73.844	73.818	73.793	73.775	73.749	73.722	73.697	73.665	73.636	73.604	73.566	73.534	73.5	73.462	73.413	73.366	73.323	73.273	73.224	73.174	73.133	73.085	73.032	72.982	72.92	72.852	72.788	72.714	72.661	72.605	72.539	72.47	72.397	72.327	72.241	72.167	72.096	72.019	71.939	71.855	71.779	71.704	71.637	71.547	71.466	71.366	71.3	71.211	71.125	71.045	70.97	70.891	70.801	70.711	70.616	70.531	70.449	70.363	70.262	70.186	70.105	70.027	69.953	69.875	69.777	69.705	69.637	69.556	69.48	69.403	69.322	69.255	69.194	69.124	69.049	68.967	68.892	68.836	68.766	68.695	68.636	68.578	68.529	68.476	68.418	68.364	68.294	68.241	68.192	68.146	68.102	68.042	67.995	67.946	67.893	67.859	67.832	67.797	67.74	67.691	67.65	67.597	67.568	67.545	67.511	67.49	67.476	67.417	67.38	67.356	67.32	67.287	67.25	67.212	67.186	67.136	67.115	67.086	67.053	66.995	66.963	66.93	66.88	66.825	66.808	66.779	66.732	66.66	66.606	66.571	66.541	66.484	66.42	66.344	66.297	66.242	66.175	66.101	66.016	65.927	65.865	65.805	65.755	65.654	65.578	65.497	65.418	65.317	65.213	65.128	65.021	64.957	64.853	64.73	64.611	64.511	64.4	64.29	64.17	64.072	63.973	63.832	63.709	63.581	63.466	63.353	63.22	63.088	62.935	62.851	62.717	62.621	62.482	62.335	62.18	62.01	61.873	61.742	61.624	61.502	61.368	61.223	61.107	60.962	60.81	60.666	60.549	60.427	60.301	60.15	60.012	59.844	59.717	59.537	59.4	59.233	59.078	58.963	58.831	58.657	58.498	58.367	58.226	58.034	57.851	57.688	57.558	57.364	57.17	57.053	56.871	56.656	56.426	56.252	56.06	55.852	55.663	55.475	55.258	55.013	54.819	54.537	54.303	53.955	53.629	53.452	53.26	53.017	52.768	52.5	52.205	51.891	51.627	51.313	51.015	50.666	50.336	50.029	49.668	49.323	49.01	48.615	48.239	47.873	47.481	47.042	46.646	46.259	45.874	45.465	45.018	44.564	44.115	43.666	43.216	42.705	42.208	41.768	41.216	40.645	40.109	39.614	39.073	38.51	37.941	37.337	36.751	36.174	35.546	34.979	34.326	33.736	33.129	32.514	31.803	31.108	30.423	29.741	29.03	28.386	27.687	26.949	26.296	25.562	24.842	24.246	23.598	22.957	22.202	21.48	20.891	20.351	19.669	19.176	18.537	17.99	17.447	16.904	16.268	15.718	15.364	14.812	14.347	14.092	13.964	13.433	12.92	12.43	12.279	11.203	11.913	10.845	10.956	10.414	9.578	9.291	9.26	8.702	8.41869	7.43974	7.41869	6.43974	5.62021	3.14214	2.15569];
xmax=[900 721 546 444.5 386.5];
ymax=[81.111 85.099 79.802 73.413 66.484];
xmin=[845.5 620.5 493 412];
ymin=[79.415 77.402 74.124 68.636];
plot(x,y,'-k',xmax,ymax,'--b',xmin,ymin,'--r');
yL = get(gca,'YLim');
line([723.5 723.5],yL,'Color','g');
line([552.5 552.5],yL,'Color','g');

intersection point , matlab , deep learning , simulink

Expert Answer

John Michell answered . 2024-12-21 00:35:57

The red curve is a piecewise linear interpolation, not really a curve, just connect the dots by the plotting routine.
 
The green lines are just vertical lines, so a fixed value of x. So all you are asking is how to use linear interpolation. You can find both solutions at once. interp1 will do it for you.
 
yred = interp1(xmin,ymin,[552.5, 723.5],'linear')
yred =
       75.654       78.324




Not satisfied with the answer ?? ASK NOW

Frequently Asked Questions

MATLAB offers tools for real-time AI applications, including Simulink for modeling and simulation. It can be used for developing algorithms and control systems for autonomous vehicles, robots, and other real-time AI systems.

MATLAB Online™ provides access to MATLAB® from your web browser. With MATLAB Online, your files are stored on MATLAB Drive™ and are available wherever you go. MATLAB Drive Connector synchronizes your files between your computers and MATLAB Online, providing offline access and eliminating the need to manually upload or download files. You can also run your files from the convenience of your smartphone or tablet by connecting to MathWorks® Cloud through the MATLAB Mobile™ app.

Yes, MATLAB provides tools and frameworks for deep learning, including the Deep Learning Toolbox. You can use MATLAB for tasks like building and training neural networks, image classification, and natural language processing.

MATLAB and Python are both popular choices for AI development. MATLAB is known for its ease of use in mathematical computations and its extensive toolbox for AI and machine learning. Python, on the other hand, has a vast ecosystem of libraries like TensorFlow and PyTorch. The choice depends on your preferences and project requirements.

You can find support, discussion forums, and a community of MATLAB users on the MATLAB website, Matlansolutions forums, and other AI-related online communities. Remember that MATLAB's capabilities in AI and machine learning continue to evolve, so staying updated with the latest features and resources is essential for effective AI development using MATLAB.

Without any hesitation the answer to this question is NO. The service we offer is 100% legal, legitimate and won't make you a cheater. Read and discover exactly what an essay writing service is and how when used correctly, is a valuable teaching aid and no more akin to cheating than a tutor's 'model essay' or the many published essay guides available from your local book shop. You should use the work as a reference and should not hand over the exact copy of it.

Matlabsolutions.com provides guaranteed satisfaction with a commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been empanelled after extensive research and quality check.

Matlabsolutions.com provides undivided attention to each Matlab assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work done at the best price in industry.