Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Substituting value from table into equation

1 visualización (últimos 30 días)
Sheryl
Sheryl el 12 de Mzo. de 2013
If i have value in table form and equation
a={1 2; 3 4; 5 6}, where column 1=x , column 2=y
c=(exp(2*x)/100)+((y^3)/10)
how can i get value x and y, and substitute into the equation, and obtain the answer for individual set, then put it into matrix form?
Thank you
  1 comentario
Walter Roberson
Walter Roberson el 12 de Mzo. de 2013
Please read the guide to tags and retag your question (and please go back and retag your other questions.) See http://www.mathworks.co.uk/matlabcentral/answers/43073-a-guide-to-tags

Respuestas (1)

Youssef  Khmou
Youssef Khmou el 12 de Mzo. de 2013
Editada: Youssef Khmou el 12 de Mzo. de 2013
hi,
You extract the values like the following :
a=(1:10)'*(1:10); % a contains 10 lines and 10 columns,the first column is x
%and the second one is y :
% Two ways :
C1=exp((2*a(:,1))./100)+((a(:,2).^3)/10);
% or :
x=a(:,1);
y=a(:,2);
C2=exp(2*x./100)+((y.^3)/10);C2=exp(2*x./100)+((y.^3)/10);
You put the result in matrix :
N=10; % depends on your operations
C=zeros(10,N);
C(:,1)=C1; % or C2 and so on,

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by