Defining a projection function
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
alpedhuez
el 12 de Mayo de 2018
Comentada: Star Strider
el 13 de Mayo de 2018
I have defined a function of three variables
function a = test(A,B,C)
a = A.*power(B,0.3).*power(C,0.7);
end
Now I want to define a function test2 that is a function test2 that is a single variable function of C with A=1 and B=10. Please advise.
0 comentarios
Respuesta aceptada
Más respuestas (1)
Jan
el 12 de Mayo de 2018
function a = test2(C)
A = 1;
B = 10;
a = A .* power(B, 0.3) .* power(C, 0.7);
end
Or easier:
function a = test2(C)
a = 1.99526231496888 .* power(C, 0.7);
end
I suggest, that you try to solve such questions by your own at first and to post the code. You can learn more from the suggestions for improvements than from code, which have been written by others from scratch.
Ver también
Categorías
Más información sobre Assembly en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!