Borrar filtros
Borrar filtros

Info

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

How would you determine the all paths travelled by the currents ?

1 visualización (últimos 30 días)
Joel Sande
Joel Sande el 14 de Abr. de 2016
Cerrada: John D'Errico el 14 de Abr. de 2016
% Hi everyone, this is a 10$ CAN to whoever is able to solve this problem
% A, B, C, D, E, F, G have their coordinates in the 3D space
x = [2 3 4 5 9 6 2];
y = [2 9 5 4 7 9 6];
z = [5 3 6 9 7 4 1];
% Let say you have a connection matrice reprensenting differents paths of the current.
%Starting point is A [x=2, y=2, z=5].
%Normally, a Bioinformatics stool can solve that request.
%First, I want to create paths.
%As The starting point is A, I should generate 3 paths (A-B , A-E, A-G)
%As B is connected to C, D and G, I should generate from A-B, the paths :
% A-B-C, A-B-D and A-B-G
%A Bioinformatics algorithm can solve that. I don't know what tool to use.
A B C D E F G
A 0 1 0 0 1 0 1
B 0 0 1 1 0 0 1
C 1 0 0 0 0 1 0
D 0 0 1 0 0 1 1
E 0 0 1 0 0 0 0
F 0 0 0 0 1 0 0
G 0 0 1 0 1 1 0
% I have a matrice B that defends the speed of each connection, based on the %Matrice A.
A B C D E F G
A 0 5 0 0 1 0 7
B 0 0 3 5 0 0 6
C 8 0 0 0 0 1 0
D 0 0 1 0 0 2 1
E 0 0 3 0 0 0 0
F 0 0 0 0 5 0 0
G 0 0 1 0 4 3 0
%%Imagine we have a current that travels those edges. This current travels according to the speed of each connection. The more the speed is high, the faster that current travels (Normally we should have the current trabelling A-B , and then disintegrating in 3 parts, 1 for each path B-C, B-D, and B-G, ...).
% I want you use it to do this :
% at t=0 print t=0 path=A
% at t=tn print t=tn path=A-B
% at t=tm print t=tm path=A-E
% at t=tq print t=tq path=A-G
% at t=.. print t=.. path=A-B-C
% at t=.. print t=.. path=A-B-D
% at t=.. print t=.. path=A-B-G
...
..
(t = length / speed) ; as speed A-B = 5 ,
tn should be dist(A-B)/5 . We have A and B coordonnates above
If the code works well, you should need Control C to stop it.
  3 comentarios
Joel Sande
Joel Sande el 14 de Abr. de 2016
Editada: Joel Sande el 14 de Abr. de 2016
It seems like someone doesn t like the idea of reward, or think that I didn t make efforts so solve it myself: Mistake.
I will provide you some code if you prefer. I did the first part in Java POO, but I had clearly to introduce the notions of multithreads otherwise it doesn t jump form a brunch to another (Just give me some time to translate it in Matlab (I am just not yet familiate with matlab POO (I used POO to write my Strings))).
Actually, the part 2 is easy once the part is done.
John D'Errico
John D'Errico el 14 de Abr. de 2016
Editada: John D'Errico el 14 de Abr. de 2016
Your mistake. You posted a question telling us what you want us to do. Then you told us that you would pay for the answer.
1. Answers is not a we do your work for pay site.
2. We do require that you have made some effort.
So far, you have written no MATLAB code and just given us a set of specs for what you want done. And for that, you intend to pay us all of $10. Wow. Sorry, but Answers is not a we write code to your specs site.
You have made no effort, at least not in terms of doing your project in MATLAB.

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by