# Help in 2D plot of coefficients

2 visualizaciones (últimos 30 días)
Haya Ali el 11 de En. de 2023
Comentada: Haya Ali el 11 de En. de 2023
I have to plot a figure like this.
Real Coefficient= [0.0723, -11.0000, 0.001, 0.0011, 0.0012, 0.0013, 0.0014, 0.0015, 0.0016, 0.0017, 0.0018, 0.0019, 0.00110, 0.00111, 0.00112, 0.00113, 0.00114, 0.00115, 0.00116, 0.00117, 0.00118, 0.00119, 0.00120, 0.00121, -1, -1] ;
Predicted Coefficient= [-0.9265, -11.0000, 0.001, 0.0011, 0.0012, 0.0013, 0.0014, 0.0015, 0.0016, 0.0017, 0.0018, 0.0011, 0.0011, 0.0011, 0.0011, 0.0011, 0.0011, 0.0012, 0.0012, 0.0012, 0.0012, 0.0012, 0.0012, 0.0012, -1, -1] ;
close all; clear all; clc;
data= [0.0723, -0.9265;
-11.0000, -11.0000;
0.001, 0.001
0.0011, 0.0011
0.0012, 0.0012
0.0013, 0.0013
0.0014, 0.0014
0.0015, 0.0015
0.0016, 0.0016
0.0017, 0.0017
0.0018, 0.0018
0.0019, 0.0011
0.00110,0.0011
0.00111,0.0011
0.00112,0.0011
0.00113,0.0011
0.00114,0.0011
0.00115,0.0012
0.00116,0.0012
0.00117,0.0012
0.00118,0.0012
0.00119,0.0012
0.00120,0.0012
0.00121,0.0012
-1.0000,-1.0000
-1.0000,-1.0000];
dy=0.2;
f=figure;
t=tiledlayout("flow");
nexttile(t);
h=scatter(x,y,100,'filled','MarkerEdgeColor','k');
C = jet(numel(x));
h.CData = C;
set(gca, 'colormap', C)
colorbar()
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

Jonas el 11 de En. de 2023
why not use normal plot command?
RealCoefficient= [0.0723, -11.0000, 0.001, 0.0011, 0.0012, 0.0013, 0.0014, 0.0015, 0.0016, 0.0017, 0.0018, 0.0019, 0.00110, 0.00111, 0.00112, 0.00113, 0.00114, 0.00115, 0.00116, 0.00117, 0.00118, 0.00119, 0.00120, 0.00121, -1, -1] ;
PredictedCoefficient= [-0.9265, -11.0000, 0.001, 0.0011, 0.0012, 0.0013, 0.0014, 0.0015, 0.0016, 0.0017, 0.0018, 0.0011, 0.0011, 0.0011, 0.0011, 0.0011, 0.0011, 0.0012, 0.0012, 0.0012, 0.0012, 0.0012, 0.0012, 0.0012, -1, -1] ;
plot(PredictedCoefficient,'or')
hold on;
plot(RealCoefficient,'+k');
xlabel('Term ID');
ylabel('V');
legend('Predicted Coeff.','Real Coeff.')
##### 1 comentarioMostrar -1 comentarios más antiguosOcultar -1 comentarios más antiguos
Haya Ali el 11 de En. de 2023
You made it simple. Thanks a lot

Iniciar sesión para comentar.

### Categorías

Más información sobre Orange en Help Center y File Exchange.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by