Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
case of two mappings
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi everyone! I am having difficulty in the combination of the two mappings, I have tried many times but still have not found a way to build the program. hope everyone help me. thank you very much.
1 Kommentar
Antworten (3)
Walter Roberson
am 21 Mai 2019
%mapping #1: x -> x^2
%mapping #2: x -> x/2 + 1
mapping1 = @(x) x.^2;
mapping2 = @(x) x/2 + 1;
map1_2 = @(x) mapping2(mapping1(x));
fplot(map1_2, [-5 5])
0 Kommentare
James Tursa
am 22 Mai 2019
Not sure which one is first, but maybe one of these is what you want?
>> mapping1 = [0 1 3 2]
mapping1 =
0 1 3 2
>> mapping2 = [0 3 2 1]
mapping2 =
0 3 2 1
>> mapping1(mapping2+1)
ans =
0 2 3 1
>> mapping2(mapping1+1)
ans =
0 3 1 2
1 Kommentar
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!